followed instructions
This commit is contained in:
parent
89dafdf022
commit
511f181e8b
11
src/main.rs
11
src/main.rs
|
@ -45,16 +45,13 @@ fn main() -> Result<(), eframe::Error> {
|
|||
..Default::default()
|
||||
};
|
||||
|
||||
let app_state: tools::AppState;
|
||||
;
|
||||
// Attempt to load previous state
|
||||
if Path::new(SAVE_PATH).exists() {
|
||||
app_state = tools::load_state(SAVE_PATH).expect("Failed to load the save");
|
||||
let app_state: tools::AppState = if Path::new(SAVE_PATH).exists() {
|
||||
app_state = tools::load_state(SAVE_PATH).expect("Failed to load the save")
|
||||
} else {
|
||||
app_state = tools::AppState {
|
||||
tabs: vec![],
|
||||
theme: 0,
|
||||
app_state = tools::AppState {tabs: vec![], theme: 0,}
|
||||
};
|
||||
}
|
||||
|
||||
eframe::run_native(
|
||||
&format!("Calcifer{}{}", tools::version(), TITLE),
|
||||
|
|
Loading…
Reference in a new issue