Simlify with matches!()

This commit is contained in:
Veetaha
2020-06-28 04:02:03 +03:00
parent 513924a7e0
commit e75e2ae5b6
20 changed files with 32 additions and 98 deletions

View File

@@ -78,10 +78,7 @@ pub fn analysis_bench(
}
}
BenchWhat::Complete(pos) | BenchWhat::GotoDef(pos) => {
let is_completion = match what {
BenchWhat::Complete(..) => true,
_ => false,
};
let is_completion = matches!(what, BenchWhat::Complete(..));
let offset = host
.analysis()