From 2cdf5ccd318356942a30136ae2fa8263b3249d28 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Mon, 28 Feb 2022 20:26:27 -0500 Subject: [PATCH] fix unnecessary unwrap --- src/egui_app.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/egui_app.rs b/src/egui_app.rs index 4417da2..068af84 100644 --- a/src/egui_app.rs +++ b/src/egui_app.rs @@ -260,8 +260,8 @@ impl epi::App for MathApp { let (back_values, bars) = function.run(); plot_ui.line(back_values.color(Color32::RED)); - if bars.is_some() { - let (bars, area) = bars.unwrap(); + if let Some(bars_data) = bars { + let (bars, area) = bars_data; plot_ui.bar_chart(BarChart::new(bars).color(Color32::BLUE).width(step)); area_list.push(digits_precision(area, 8)) } else {