diff options
| author | Chris Denton <chris@chrisdenton.dev> | 2023-11-21 23:21:56 +0000 |
|---|---|---|
| committer | Chris Denton <chris@chrisdenton.dev> | 2023-11-22 13:00:28 +0000 |
| commit | 42734599bd613efee41d0a508e0fc60ea6d86058 (patch) | |
| tree | a93da5f87862b5aa100b3f189bcfc8598dce20e7 | |
| parent | fe255695f9ceb2417350d4d355ce35bfe5ad695b (diff) | |
| download | rust-42734599bd613efee41d0a508e0fc60ea6d86058.tar.gz rust-42734599bd613efee41d0a508e0fc60ea6d86058.zip | |
needless_borrows_for_generic_args
the borrowed expression implements the required traits
| -rw-r--r-- | library/std/src/sys/windows/fs.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/windows/process.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sys/windows/fs.rs b/library/std/src/sys/windows/fs.rs index 4deda6d97c4..a0d3401a0a6 100644 --- a/library/std/src/sys/windows/fs.rs +++ b/library/std/src/sys/windows/fs.rs @@ -156,7 +156,7 @@ impl DirEntry { } pub fn path(&self) -> PathBuf { - self.root.join(&self.file_name()) + self.root.join(self.file_name()) } pub fn file_name(&self) -> OsString { diff --git a/library/std/src/sys/windows/process.rs b/library/std/src/sys/windows/process.rs index f4078d35944..f7e87a6734d 100644 --- a/library/std/src/sys/windows/process.rs +++ b/library/std/src/sys/windows/process.rs @@ -463,7 +463,7 @@ fn resolve_exe<'a>( // Search the directories given by `search_paths`. let result = search_paths(parent_paths, child_paths, |mut path| { - path.push(&exe_path); + path.push(exe_path); if !has_extension { path.set_extension(EXE_EXTENSION); } |
