Fix clippy::manual_map
lint violations (#36584)
#36577 Release Notes: - N/A
This commit is contained in:
parent
de12633591
commit
bc79076ad3
18 changed files with 62 additions and 118 deletions
|
@ -794,10 +794,8 @@ mod tests {
|
|||
fn finish(mut finder: StreamingFuzzyMatcher) -> Option<String> {
|
||||
let snapshot = finder.snapshot.clone();
|
||||
let matches = finder.finish();
|
||||
if let Some(range) = matches.first() {
|
||||
Some(snapshot.text_for_range(range.clone()).collect::<String>())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
matches
|
||||
.first()
|
||||
.map(|range| snapshot.text_for_range(range.clone()).collect::<String>())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue