Skip to content

Commit

Permalink
Clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Dec 5, 2022
1 parent be6d23e commit 3519358
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions crates/egui/src/widgets/plot/items/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 3519358

Please sign in to comment.