Skip to content

Commit

Permalink
Remove unnecessary reborrows
Browse files Browse the repository at this point in the history
  • Loading branch information
camelid committed Nov 10, 2021
1 parent cf6a73c commit c615b11
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ impl Clean<GenericBound> for hir::GenericBound<'_> {
};

GenericBound::TraitBound(
PolyTrait { trait_: (trait_ref, &*bindings).clean(cx), generic_params: vec![] },
PolyTrait {
trait_: (trait_ref, &bindings[..]).clean(cx),
generic_params: vec![],
},
hir::TraitBoundModifier::None,
)
}
Expand Down Expand Up @@ -764,7 +767,7 @@ impl<'a> Clean<Function> for (&'a hir::FnSig<'a>, &'a hir::Generics<'a>, hir::Bo
let (generics, decl) = enter_impl_trait(cx, |cx| {
let generics = self.1.clean(cx);
let args = (self.0.decl.inputs, self.2).clean(cx);
let decl = clean_fn_decl_with_args(cx, &*self.0.decl, args);
let decl = clean_fn_decl_with_args(cx, self.0.decl, args);
(generics, decl)
});
Function { decl, generics, header: self.0.header }
Expand Down

0 comments on commit c615b11

Please sign in to comment.