some low hanging clippy::perf fixes
This commit is contained in:
parent
76d18cfb89
commit
7f2df9ad65
6 changed files with 11 additions and 10 deletions
|
@ -2090,7 +2090,7 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
|
|||
self.is_unnamed(),
|
||||
self.is_underscore(),
|
||||
self.is_named(),
|
||||
sugg.starts_with("&"),
|
||||
sugg.starts_with('&'),
|
||||
) {
|
||||
(true, _, _, false) => (self.span_unnamed_borrow(), sugg),
|
||||
(true, _, _, true) => {
|
||||
|
|
|
@ -2605,8 +2605,10 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
|
|||
binding.ident,
|
||||
);
|
||||
self.with(scope, |_, this| {
|
||||
let scope =
|
||||
Scope::Supertrait { lifetimes: lifetimes.unwrap_or(vec![]), s: this.scope };
|
||||
let scope = Scope::Supertrait {
|
||||
lifetimes: lifetimes.unwrap_or_default(),
|
||||
s: this.scope,
|
||||
};
|
||||
this.with(scope, |_, this| this.visit_assoc_type_binding(binding));
|
||||
});
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue