diff --git a/src/blockchain/mod.rs b/src/blockchain/mod.rs index 66538816..25c6055b 100644 --- a/src/blockchain/mod.rs +++ b/src/blockchain/mod.rs @@ -169,7 +169,7 @@ pub fn progress() -> (Sender, Receiver) { impl Progress for Sender { fn update(&self, progress: f32, message: Option) -> Result<(), Error> { - if progress < 0.0 || progress > 100.0 { + if !(0.0..=100.0).contains(&progress) { return Err(Error::InvalidProgressValue(progress)); }