diff --git a/src/monitor.rs b/src/monitor.rs index 0dde185..7b2490f 100644 --- a/src/monitor.rs +++ b/src/monitor.rs @@ -166,8 +166,7 @@ impl Monitor { .find(&display_serial_key) .and_then(|x| x.downcast::()) .and_then(|x| x.to_i32()) - .map(|x| x as u32) - .unwrap_or(0); + .map_or(0, |x| x as u32); if display_vendor == display.vendor_number() && display_product == display.model_number()