Skip to content

Commit

Permalink
fix: remove mutable borrow reservation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Alberto Colombo committed Jan 17, 2022
1 parent a788301 commit 3718db4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ impl epi::App for Wordler {
let last_word = self.attempts.last().unwrap();
self.game.add_filters(last_word.letters.clone());
match self.game.suggest_word() {
Some(word) => self.attempts.push(last_word.next(word)),
Some(word) => {
let next_word = last_word.next(word);
self.attempts.push(next_word);
},
_ => (),
}
}
Expand Down

0 comments on commit 3718db4

Please sign in to comment.