use match instead of if statement
This commit is contained in:
parent
c84a98f291
commit
da091c8174
@ -323,10 +323,9 @@ impl epi::App for MathApp {
|
|||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
if ui
|
if ui
|
||||||
.add(Button::new("Panel"))
|
.add(Button::new("Panel"))
|
||||||
.on_hover_text(if self.settings.show_side_panel {
|
.on_hover_text(match self.settings.show_side_panel {
|
||||||
"Hide Side Panel"
|
true => "Hide Side Panel",
|
||||||
} else {
|
false => "Show Side Panel",
|
||||||
"Show Side Panel"
|
|
||||||
})
|
})
|
||||||
.clicked()
|
.clicked()
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user