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:
Maximiliano Sandoval 2024-02-12 14:17:28 +01:00 committed by Fabian Grünbichler
parent 5251bf89ba
commit 2224b3900d
4 changed files with 5 additions and 5 deletions

View File

@ -199,7 +199,7 @@ impl PullSource for RemoteSource {
});
if !namespace.is_root() {
args["ns"] = serde_json::to_value(&namespace)?;
args["ns"] = serde_json::to_value(namespace)?;
}
self.client.login().await?;
@ -230,7 +230,7 @@ impl PullSource for RemoteSource {
}
fn get_store(&self) -> &str {
&self.repo.store()
self.repo.store()
}
async fn reader(

View File

@ -190,7 +190,7 @@ pub fn generate_report() -> String {
.map(|file_name| {
let path = Path::new(file_name);
if path.is_dir() {
get_directory_content(&path)
get_directory_content(path)
} else {
get_file_content(file_name)
}

View File

@ -88,7 +88,7 @@ impl OnlineStatusMap {
}
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)) => {
online_set.insert(media_id.label.uuid.clone());
}

View File

@ -1167,7 +1167,7 @@ pub fn wipe_blockdev(disk: &Disk, worker: Arc<WorkerTask>) -> Result<(), Error>
if is_partition {
// set the partition type to 0x83 'Linux filesystem'
change_parttype(&disk, "8300", worker)?;
change_parttype(disk, "8300", worker)?;
}
Ok(())