Simplify sort_by
calls
This commit is contained in:
parent
ac4379fea9
commit
775bacd1b8
7 changed files with 10 additions and 16 deletions
|
@ -1736,7 +1736,7 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> {
|
|||
|
||||
let name = path[path.len() - 1].ident.name;
|
||||
// Make sure error reporting is deterministic.
|
||||
names.sort_by(|a, b| a.candidate.as_str().partial_cmp(b.candidate.as_str()).unwrap());
|
||||
names.sort_by(|a, b| a.candidate.as_str().cmp(b.candidate.as_str()));
|
||||
|
||||
match find_best_match_for_name(
|
||||
&names.iter().map(|suggestion| suggestion.candidate).collect::<Vec<Symbol>>(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue