Skip to content

Commit

Permalink
examples: Simplify match
Browse files Browse the repository at this point in the history
  • Loading branch information
Luni-4 committed Jul 12, 2023
1 parent 811b248 commit fac20b1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions examples/cupertino/cupertino_alert/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,7 @@ impl Application for Alert {
}

fn view(&self) -> Element<Message> {
let modal_hidden: bool = match self {
Alert::ShowModal => false,
_ => true,
};
let modal_hidden = !matches!(self, Alert::ShowModal);

match self {
Alert::CancelEvent => println!("Received click for the cancel button"),
Expand Down

0 comments on commit fac20b1

Please sign in to comment.