Cargo fix + clippy suggestions
Fix clippy warnings
@@ -184,23 +184,19 @@ mod test {
s.refresh_all();
// All CPU usage will start at zero until the second refresh
- assert_eq!(
- s.processes()
+ assert!(s
+ .processes()
.iter()
- .all(|(_, proc_)| proc_.cpu_usage() == 0.0),
- true
- );
+ .all(|(_, proc_)| proc_.cpu_usage() == 0.0));
// Wait a bit to update CPU usage values
std::thread::sleep(std::time::Duration::from_millis(100));
s.refresh_all();
- assert_eq!(
- s.processes()
+ assert!(s
+ .processes()
.iter()
.all(|(_, proc_)| proc_.cpu_usage() >= 0.0
- && proc_.cpu_usage() <= (s.processors().len() as f32) * 100.0),
- true
- );
+ && proc_.cpu_usage() <= (s.processors().len() as f32) * 100.0));
}
#[test]
