mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-10-04 20:16:38 +00:00
remove needless borrows
Fixes the clippy lint: ``` warning: the borrowed expression implements the required traits --> src/server/report.rs:193:47 | 193 | get_directory_content(&path) | ^^^^^ help: change this to: `path` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default ``` Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
This commit is contained in:
parent
5251bf89ba
commit
2224b3900d
@ -199,7 +199,7 @@ impl PullSource for RemoteSource {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if !namespace.is_root() {
|
if !namespace.is_root() {
|
||||||
args["ns"] = serde_json::to_value(&namespace)?;
|
args["ns"] = serde_json::to_value(namespace)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.client.login().await?;
|
self.client.login().await?;
|
||||||
@ -230,7 +230,7 @@ impl PullSource for RemoteSource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn get_store(&self) -> &str {
|
fn get_store(&self) -> &str {
|
||||||
&self.repo.store()
|
self.repo.store()
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn reader(
|
async fn reader(
|
||||||
|
@ -190,7 +190,7 @@ pub fn generate_report() -> String {
|
|||||||
.map(|file_name| {
|
.map(|file_name| {
|
||||||
let path = Path::new(file_name);
|
let path = Path::new(file_name);
|
||||||
if path.is_dir() {
|
if path.is_dir() {
|
||||||
get_directory_content(&path)
|
get_directory_content(path)
|
||||||
} else {
|
} else {
|
||||||
get_file_content(file_name)
|
get_file_content(file_name)
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ impl OnlineStatusMap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn insert_into_online_set(inventory: &Inventory, label_text: &str, online_set: &mut HashSet<Uuid>) {
|
fn insert_into_online_set(inventory: &Inventory, label_text: &str, online_set: &mut HashSet<Uuid>) {
|
||||||
match inventory.find_media_by_label_text(&label_text) {
|
match inventory.find_media_by_label_text(label_text) {
|
||||||
Ok(Some(media_id)) => {
|
Ok(Some(media_id)) => {
|
||||||
online_set.insert(media_id.label.uuid.clone());
|
online_set.insert(media_id.label.uuid.clone());
|
||||||
}
|
}
|
||||||
|
@ -1167,7 +1167,7 @@ pub fn wipe_blockdev(disk: &Disk, worker: Arc<WorkerTask>) -> Result<(), Error>
|
|||||||
|
|
||||||
if is_partition {
|
if is_partition {
|
||||||
// set the partition type to 0x83 'Linux filesystem'
|
// set the partition type to 0x83 'Linux filesystem'
|
||||||
change_parttype(&disk, "8300", worker)?;
|
change_parttype(disk, "8300", worker)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
Reference in New Issue
Block a user