Skip to content

Commit

Permalink
Set latest_message to None; only print it once
Browse files Browse the repository at this point in the history
  • Loading branch information
paulyoung committed Jun 9, 2024
1 parent 8c42941 commit 090aecf
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ impl Update for State {
fn update(&mut self) -> UpdateCtrl {
if let Some(latest_message) = self.latest_message.clone() {
println!("Latest message: {:#?}", latest_message);
self.latest_message = None;
}
UpdateCtrl::Continue
}
Expand Down

0 comments on commit 090aecf

Please sign in to comment.