use match instead of if

This commit is contained in:
Simon Gardling 2022-03-03 21:07:07 -05:00
parent 8faee669e0
commit 4645cec778

View File

@ -218,10 +218,9 @@ impl MathApp {
} }
if ui if ui
.add(Button::new("")) .add(Button::new(""))
.on_hover_text(if integral_enabled { .on_hover_text(match integral_enabled {
"Don't integrate" true => "Don't integrate",
} else { false => "Integrate",
"Integrate"
}) })
.clicked() .clicked()
{ {