more clippy lints

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller
2020-10-14 14:22:38 +02:00
parent 4c0ae82e23
commit 2081327428
7 changed files with 33 additions and 31 deletions

View File

@ -164,8 +164,8 @@ fn list_groups(
let list_all = (user_privs & PRIV_DATASTORE_AUDIT) != 0;
let owner = datastore.get_owner(group)?;
if !list_all {
if owner != userid { continue; }
if !list_all && owner != userid {
continue;
}
let result_item = GroupListItem {
@ -355,8 +355,8 @@ pub fn list_snapshots (
let list_all = (user_privs & PRIV_DATASTORE_AUDIT) != 0;
let owner = datastore.get_owner(group)?;
if !list_all {
if owner != userid { continue; }
if !list_all && owner != userid {
continue;
}
let mut size = None;

View File

@ -31,10 +31,8 @@ pub fn create_value_from_rrd(
} else {
result.push(json!({ "time": t }));
}
} else {
if let Some(value) = list[index] {
result[index][name] = value.into();
}
} else if let Some(value) = list[index] {
result[index][name] = value.into();
}
t += reso;
}