summaryrefslogtreecommitdiffstats
path: root/native/src/widget/progress_bar.rs
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/widget/progress_bar.rs')
-rw-r--r--native/src/widget/progress_bar.rs2
1 files changed, 1 insertions, 1 deletions
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<f32>, 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,