mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Some clippy fixes
This commit is contained in:
parent
5806195bc1
commit
b441b4e8ef
17 changed files with 23 additions and 29 deletions
|
@ -102,12 +102,10 @@ fn tests_from_dir(dir: &Path) -> Result<Tests> {
|
|||
for test in collect_tests(&text) {
|
||||
if test.ok {
|
||||
if let Some(old_test) = res.ok.insert(test.name.clone(), test) {
|
||||
Err(format!("Duplicate test: {}", old_test.name))?
|
||||
}
|
||||
} else {
|
||||
if let Some(old_test) = res.err.insert(test.name.clone(), test) {
|
||||
Err(format!("Duplicate test: {}", old_test.name))?
|
||||
return Err(format!("Duplicate test: {}", old_test.name).into());
|
||||
}
|
||||
} else if let Some(old_test) = res.err.insert(test.name.clone(), test) {
|
||||
return Err(format!("Duplicate test: {}", old_test.name).into());
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue