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
.add(Button::new(""))
.on_hover_text(if integral_enabled {
"Don't integrate"
} else {
"Integrate"
.on_hover_text(match integral_enabled {
true => "Don't integrate",
false => "Integrate",
})
.clicked()
{