From 3519358b7b5ce50879ac3cd16e5df26c7cee53bb Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Mon, 5 Dec 2022 13:41:25 +0100 Subject: [PATCH] Clippy fix --- crates/egui/src/widgets/plot/items/mod.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/egui/src/widgets/plot/items/mod.rs b/crates/egui/src/widgets/plot/items/mod.rs index f869032a..138aed6e 100644 --- a/crates/egui/src/widgets/plot/items/mod.rs +++ b/crates/egui/src/widgets/plot/items/mod.rs @@ -855,10 +855,11 @@ impl PlotItem for Points { let default_stroke = Stroke::new(stroke_size, *color); let mut stem_stroke = default_stroke; - let stroke = (!filled) - .then_some(default_stroke) - .unwrap_or_else(Stroke::none); - let fill = filled.then(|| *color).unwrap_or_default(); + let (fill, stroke) = if *filled { + (*color, Stroke::NONE) + } else { + (Color32::TRANSPARENT, default_stroke) + }; if *highlight { radius *= 2f32.sqrt();