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>
});
if !namespace.is_root() {
- args["ns"] = serde_json::to_value(&namespace)?;
+ args["ns"] = serde_json::to_value(namespace)?;
}
self.client.login().await?;
}
fn get_store(&self) -> &str {
- &self.repo.store()
+ self.repo.store()
}
async fn reader(
.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)
}
}
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());
}
if is_partition {
// set the partition type to 0x83 'Linux filesystem'
- change_parttype(&disk, "8300", worker)?;
+ change_parttype(disk, "8300", worker)?;
}
Ok(())