mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
clippy: Use if lets and remove redundant returns
This commit is contained in:
parent
5db663d61f
commit
d493a4476c
11 changed files with 22 additions and 29 deletions
|
@ -112,9 +112,8 @@ fn existing_tests(dir: &Path) -> Result<HashMap<String, (PathBuf, Test)>> {
|
|||
name: name.clone(),
|
||||
text,
|
||||
};
|
||||
match res.insert(name, (path, test)) {
|
||||
Some(old) => println!("Duplicate test: {:?}", old),
|
||||
None => (),
|
||||
if let Some(old) = res.insert(name, (path, test)) {
|
||||
println!("Duplicate test: {:?}", old);
|
||||
}
|
||||
}
|
||||
Ok(res)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue