Replace len() < 1 with is_empty()
This commit is contained in:
parent
0539f0b515
commit
a527f7396e
@ -145,7 +145,7 @@ fn controllers(config: &Config, filter: bool) -> std::io::Result<Vec<HwMon>> {
|
||||
|
||||
fn service(config: Config) -> std::io::Result<()> {
|
||||
let mut controllers = controllers(&config, true)?;
|
||||
if controllers.len() < 1 {
|
||||
if controllers.is_empty() {
|
||||
return Err(not_found());
|
||||
}
|
||||
let mut cache = std::collections::HashMap::new();
|
||||
|
Loading…
Reference in New Issue
Block a user