Use contains combinator

As suggested by clippy, use the `contains` combinator instead of doing
manual range check on floats.
This commit is contained in:
Tobin Harding authored and Steve Myers committed 2021-01-18 10:46:12 -08:00
1 parent 4686ebb420
commit 03b7c1b46b
1 file changed
+1 -1
+1 -1
View File
@@ -169,7 +169,7 @@ pub fn progress() -> (Sender<ProgressData>, Receiver<ProgressData>) {
impl Progress for Sender<ProgressData> {
fn update(&self, progress: f32, message: Option<String>) -> Result<(), Error> {
if progress < 0.0 || progress > 100.0 {
if !(0.0..=100.0).contains(&progress) {
return Err(Error::InvalidProgressValue(progress));
}