From 4645cec77834d4993becbc41ed3ce9a74826d90b Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Thu, 3 Mar 2022 21:07:07 -0500 Subject: [PATCH] use match instead of if --- src/egui_app.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/egui_app.rs b/src/egui_app.rs index d0393ba..cec6e96 100644 --- a/src/egui_app.rs +++ b/src/egui_app.rs @@ -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() {