Skip to content

Commit

Permalink
Fix clippy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
septum committed Dec 20, 2022
1 parent fc42a28 commit d2c0859
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/resources/save_file/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,11 @@ impl SaveFile {
}

pub fn unlock_new_level(&mut self, level: &Level) {
match level.kind {
LevelKind::Stock(index) => {
let unlocked_levels = self.unlocked_levels();
if unlocked_levels == index + 1 && unlocked_levels < TOTAL_STOCK_LEVELS {
self.stock_records.push(LevelRecord::default());
}
if let LevelKind::Stock(index) = level.kind {
let unlocked_levels = self.unlocked_levels();
if unlocked_levels == index + 1 && unlocked_levels < TOTAL_STOCK_LEVELS {
self.stock_records.push(LevelRecord::default());
}
_ => {}
}
}

Expand Down

0 comments on commit d2c0859

Please sign in to comment.