remove needless borrows
This commit is contained in:
@@ -888,6 +888,6 @@ enum Foo {
|
||||
let enum_ = ast_mut_from_text::<ast::Enum>(before);
|
||||
enum_.variant_list().map(|it| it.add_variant(variant));
|
||||
let after = enum_.to_string();
|
||||
assert_eq_text!(&trim_indent(expected.trim()), &trim_indent(&after.trim()));
|
||||
assert_eq_text!(&trim_indent(expected.trim()), &trim_indent(after.trim()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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" {
|
||||
|
||||
Reference in New Issue
Block a user