From c26b3069e0070aa9a4e87b88f5837c8045fcf31b Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sun, 6 Sep 2020 06:58:40 +0200 Subject: [PATCH] Fix a clippy nit --- egui/src/widgets.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/egui/src/widgets.rs b/egui/src/widgets.rs index 9c64fdb8..5966c7da 100644 --- a/egui/src/widgets.rs +++ b/egui/src/widgets.rs @@ -389,7 +389,7 @@ impl<'a> Widget for Checkbox<'a> { }); } - let text_color = text_color.unwrap_or(visuals.text_color()); + let text_color = text_color.unwrap_or_else(|| visuals.text_color()); ui.painter() .galley(text_cursor, galley, text_style, text_color); response