mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-17 07:45:08 +00:00
remove needless borrows
This commit is contained in:
parent
77051679d7
commit
ed128872eb
53 changed files with 87 additions and 87 deletions
|
@ -157,7 +157,7 @@ fn collect_rust_files(root_dir: &Path, paths: &[&str]) -> Vec<(PathBuf, String)>
|
|||
/// Collects paths to all `.rs` files from `dir` in a sorted `Vec<PathBuf>`.
|
||||
fn rust_files_in_dir(dir: &Path) -> Vec<PathBuf> {
|
||||
let mut acc = Vec::new();
|
||||
for file in fs::read_dir(&dir).unwrap() {
|
||||
for file in fs::read_dir(dir).unwrap() {
|
||||
let file = file.unwrap();
|
||||
let path = file.path();
|
||||
if path.extension().unwrap_or_default() == "rs" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue