forked from Proxmox/proxmox
tree-wide: fix needless borrows
found and fixed via clippy Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
cb32acc703
commit
5b19368000
@ -393,10 +393,10 @@ fn commit_journal_impl(
|
||||
// save all RRDs - we only need a read lock here
|
||||
// Note: no fsync here (we do it afterwards)
|
||||
for rel_path in files.iter() {
|
||||
let parent_dir = rrd_parent_dir(&config.basedir, &rel_path);
|
||||
let parent_dir = rrd_parent_dir(&config.basedir, rel_path);
|
||||
dir_set.insert(parent_dir);
|
||||
rrd_file_count += 1;
|
||||
if let Err(err) = rrd_map.read().unwrap().flush_rrd_file(&rel_path) {
|
||||
if let Err(err) = rrd_map.read().unwrap().flush_rrd_file(rel_path) {
|
||||
errors += 1;
|
||||
log::error!("unable to save rrd {}: {}", rel_path, err);
|
||||
}
|
||||
|
@ -317,7 +317,7 @@ impl RRD {
|
||||
}
|
||||
|
||||
let rrd = if raw[0..8] == rrd_v1::PROXMOX_RRD_MAGIC_1_0 {
|
||||
let v1 = rrd_v1::RRDv1::from_raw(&raw)?;
|
||||
let v1 = rrd_v1::RRDv1::from_raw(raw)?;
|
||||
v1.to_rrd_v2()
|
||||
.map_err(|err| format_err!("unable to convert from old V1 format - {}", err))?
|
||||
} else if raw[0..8] == PROXMOX_RRD_MAGIC_2_0 {
|
||||
|
Loading…
Reference in New Issue
Block a user