tree-wide: use is_empty() and similar
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
@ -92,7 +92,7 @@ fn authenticate_user(
|
||||
if *name == privilege_name {
|
||||
let mut path_vec = Vec::new();
|
||||
for part in path.split('/') {
|
||||
if part != "" {
|
||||
if !part.is_empty() {
|
||||
path_vec.push(part);
|
||||
}
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ pub fn restore(
|
||||
let store_map = DataStoreMap::try_from(store)
|
||||
.map_err(|err| format_err!("cannot parse store mapping: {}", err))?;
|
||||
let used_datastores = store_map.used_datastores();
|
||||
if used_datastores.len() == 0 {
|
||||
if used_datastores.is_empty() {
|
||||
bail!("no datastores given");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user