mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
needless_borrows_for_generic_args
the borrowed expression implements the required traits
This commit is contained in:
@@ -156,7 +156,7 @@ fn new(root: &Arc<PathBuf>, wfd: &c::WIN32_FIND_DATAW) -> Option<DirEntry> {
|
||||
}
|
||||
|
||||
pub fn path(&self) -> PathBuf {
|
||||
self.root.join(&self.file_name())
|
||||
self.root.join(self.file_name())
|
||||
}
|
||||
|
||||
pub fn file_name(&self) -> OsString {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user