use match instead of if
This commit is contained in:
parent
8faee669e0
commit
4645cec778
@ -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()
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user