Replace len() < 1 with is_empty()

This commit is contained in:
Adrian Woźniak 2021-08-02 10:21:11 +02:00
parent 0539f0b515
commit a527f7396e
No known key found for this signature in database
GPG Key ID: DE43476F72AD3F6C

View File

@ -145,7 +145,7 @@ fn controllers(config: &Config, filter: bool) -> std::io::Result<Vec<HwMon>> {
fn service(config: Config) -> std::io::Result<()> { fn service(config: Config) -> std::io::Result<()> {
let mut controllers = controllers(&config, true)?; let mut controllers = controllers(&config, true)?;
if controllers.len() < 1 { if controllers.is_empty() {
return Err(not_found()); return Err(not_found());
} }
let mut cache = std::collections::HashMap::new(); let mut cache = std::collections::HashMap::new();