summaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-07-30 13:24:39 +0300
committerLars Wirzenius <liw@liw.fi>2021-07-30 13:30:18 +0300
commitd95a6470a4bcd9a28ae5603b863820921a05e969 (patch)
treeeca9853a840fe5027a51c010963929482269b0d3 /src/cmd
parentcc3524fd60169a66c8a4e2178448bf5f6d07c99b (diff)
downloadobnam2-d95a6470a4bcd9a28ae5603b863820921a05e969.tar.gz
cleanup: fix things rustc/clipppy now complain about
Mostly https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow. Sponsored-by: author
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/list_files.rs2
-rw-r--r--src/cmd/restore.rs8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/cmd/list_files.rs b/src/cmd/list_files.rs
index 723781b..e511327 100644
--- a/src/cmd/list_files.rs
+++ b/src/cmd/list_files.rs
@@ -30,7 +30,7 @@ impl ListFiles {
let gen = client.fetch_generation(&gen_id, temp.path()).await?;
for file in gen.files()?.iter()? {
let file = file?;
- println!("{}", format_entry(&file.entry(), file.reason()));
+ println!("{}", format_entry(file.entry(), file.reason()));
}
Ok(())
diff --git a/src/cmd/restore.rs b/src/cmd/restore.rs
index 458397d..c770501 100644
--- a/src/cmd/restore.rs
+++ b/src/cmd/restore.rs
@@ -141,11 +141,11 @@ async fn restore_generation(
let to = restored_path(entry, to)?;
match entry.kind() {
- FilesystemKind::Regular => restore_regular(client, &gen, &to, fileid, &entry).await?,
+ FilesystemKind::Regular => restore_regular(client, gen, &to, fileid, entry).await?,
FilesystemKind::Directory => restore_directory(&to)?,
- FilesystemKind::Symlink => restore_symlink(&to, &entry)?,
- FilesystemKind::Socket => restore_socket(&to, &entry)?,
- FilesystemKind::Fifo => restore_fifo(&to, &entry)?,
+ FilesystemKind::Symlink => restore_symlink(&to, entry)?,
+ FilesystemKind::Socket => restore_socket(&to, entry)?,
+ FilesystemKind::Fifo => restore_fifo(&to, entry)?,
}
Ok(())
}