Skip to content

Commit 8ab36a1

Browse files
committed
needless_borrows_for_generic_args
the borrowed expression implements the required traits
1 parent 965b958 commit 8ab36a1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/std/src/sys/windows/fs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ impl DirEntry {
156156
}
157157

158158
pub fn path(&self) -> PathBuf {
159-
self.root.join(&self.file_name())
159+
self.root.join(self.file_name())
160160
}
161161

162162
pub fn file_name(&self) -> OsString {

library/std/src/sys/windows/process.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ fn resolve_exe<'a>(
463463

464464
// Search the directories given by `search_paths`.
465465
let result = search_paths(parent_paths, child_paths, |mut path| {
466-
path.push(&exe_path);
466+
path.push(exe_path);
467467
if !has_extension {
468468
path.set_extension(EXE_EXTENSION);
469469
}

0 commit comments

Comments
 (0)