From 2c0fdf16df836b9eb7cc85ae68bc25ca74e83dd4 Mon Sep 17 00:00:00 2001 From: Johannes Schiffer Date: Fri, 18 Nov 2022 17:49:24 +0100 Subject: [PATCH] plot: resolve clippy warning --- crates/egui/src/widgets/plot/axis.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/egui/src/widgets/plot/axis.rs b/crates/egui/src/widgets/plot/axis.rs index 84d150263..8702f2688 100644 --- a/crates/egui/src/widgets/plot/axis.rs +++ b/crates/egui/src/widgets/plot/axis.rs @@ -187,7 +187,7 @@ impl Widget for AxisWidget { let galley = text.into_galley(ui, Some(false), f32::INFINITY, TextStyle::Body); let text_color = visuals .override_text_color - .unwrap_or(ui.visuals().text_color()); + .unwrap_or_else(|| ui.visuals().text_color()); let angle: f32 = match AXIS { X_AXIS => 0.0, Y_AXIS => -std::f32::consts::PI * 0.5,