From 6bb01b727611b83592f96b2b89371a12e7ce54d8 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 20 Dec 2022 11:31:25 +0100 Subject: Fix `clippy` lints for Rust 1.66 --- native/src/widget/progress_bar.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'native/src/widget/progress_bar.rs') diff --git a/native/src/widget/progress_bar.rs b/native/src/widget/progress_bar.rs index f059026f..7d5d5be5 100644 --- a/native/src/widget/progress_bar.rs +++ b/native/src/widget/progress_bar.rs @@ -47,7 +47,7 @@ where /// * the current value of the [`ProgressBar`] pub fn new(range: RangeInclusive, value: f32) -> Self { ProgressBar { - value: value.max(*range.start()).min(*range.end()), + value: value.clamp(*range.start(), *range.end()), range, width: Length::Fill, height: None, -- cgit