Skip to content

Commit e803cb3

Browse files
author
Stephan Dilly
committed
unneeded clones
1 parent ea244b8 commit e803cb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: asyncgit/src/sync/commit_files.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub(crate) fn get_commit_diff(
6868
None
6969
};
7070

71-
let mut opt = pathspec.clone().map(|p| {
71+
let mut opt = pathspec.as_ref().map(|p| {
7272
let mut opts = DiffOptions::new();
7373
opts.pathspec(p);
7474
opts.show_binary(true);
@@ -87,7 +87,7 @@ pub(crate) fn get_commit_diff(
8787
return get_commit_diff(
8888
repo,
8989
CommitId::new(untracked_commit),
90-
(&pathspec).clone(),
90+
pathspec,
9191
);
9292
}
9393

0 commit comments

Comments
 (0)