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:
@ -265,9 +265,9 @@ impl ScsiMediaChange for ScsiTapeChanger {
|
||||
}
|
||||
|
||||
let status = if USE_MTX {
|
||||
mtx::mtx_status(&self)
|
||||
mtx::mtx_status(self)
|
||||
} else {
|
||||
sg_pt_changer::status(&self)
|
||||
sg_pt_changer::status(self)
|
||||
};
|
||||
|
||||
match &status {
|
||||
|
@ -21,7 +21,7 @@ pub fn mtx_status(config: &ScsiTapeChanger) -> Result<MtxStatus, Error> {
|
||||
|
||||
let mut status = parse_mtx_status(&output)?;
|
||||
|
||||
status.mark_import_export_slots(&config)?;
|
||||
status.mark_import_export_slots(config)?;
|
||||
|
||||
Ok(status)
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ Data Transfer Element 1:Empty
|
||||
Storage Element 24 IMPORT/EXPORT:Empty
|
||||
"###;
|
||||
|
||||
let _ = parse_mtx_status(&output)?;
|
||||
let _ = parse_mtx_status(output)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
@ -192,11 +192,11 @@ pub fn update_changer_online_status(
|
||||
let mut online_map = OnlineStatusMap::new(drive_config)?;
|
||||
let mut online_set = HashSet::new();
|
||||
for label_text in label_text_list.iter() {
|
||||
if let Some(media_id) = inventory.find_media_by_label_text(&label_text) {
|
||||
if let Some(media_id) = inventory.find_media_by_label_text(label_text) {
|
||||
online_set.insert(media_id.label.uuid.clone());
|
||||
}
|
||||
}
|
||||
online_map.update_online_status(&changer_name, online_set)?;
|
||||
online_map.update_online_status(changer_name, online_set)?;
|
||||
inventory.update_online_status(&online_map)?;
|
||||
|
||||
Ok(())
|
||||
|
Reference in New Issue
Block a user