rustc_resolve: don't open-code Option::filter
This commit is contained in:
parent
6f22dfe4df
commit
efabee2dee
1 changed files with 1 additions and 4 deletions
|
@ -1976,10 +1976,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
|
|||
.collect::<Vec<_>>();
|
||||
candidates.sort();
|
||||
candidates.dedup();
|
||||
match find_best_match_for_name(&candidates, ident, None) {
|
||||
Some(sugg) if sugg == ident => None,
|
||||
sugg => sugg,
|
||||
}
|
||||
find_best_match_for_name(&candidates, ident, None).filter(|sugg| *sugg != ident)
|
||||
}
|
||||
|
||||
pub(crate) fn report_path_resolution_error(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue