mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
rustc_resolve: don't open-code Option::filter
This commit is contained in:
parent
6f22dfe4df
commit
efabee2dee
@ -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…
Reference in New Issue
Block a user