Skip to content

Commit

Permalink
Change if to match
Browse files Browse the repository at this point in the history
  • Loading branch information
John Baber-Lucero committed May 5, 2022
1 parent e7bdfc9 commit dea9d47
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
- Allow placing notes are locations in the bytes.
- Use cross platform colors so when compiled with mingw, still get terminal colors
- vihex may handle this
- Make l/L take filename as an argument
13 changes: 7 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -625,12 +625,13 @@ pub fn load_state_from_file(state: &mut ec::State) {
let filename = ec::read_string_from_user(Some(
"Enter filename from which to load state: "));
if filename.is_ok() {
let new_state = State::read_from_filename(&filename.unwrap());
if new_state.is_ok() {
*state = new_state.unwrap();
}
else {
println!("? {:?}", new_state);
match State::read_from_filename(&filename.unwrap()) {
Ok(new_state) => {
*state = new_state;
},
Err(err) => {
println!("? {}", err);
}
}
}
else {
Expand Down

0 comments on commit dea9d47

Please sign in to comment.