Skip to content

Commit

Permalink
Rollup merge of #101365 - matthiaskrgr:clones2, r=fee1-dead
Browse files Browse the repository at this point in the history
remove redundant clones
  • Loading branch information
matthiaskrgr authored Sep 3, 2022
2 parents 2cd273d + 57198b5 commit 39c16eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_parse/src/parser/attr_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl AttrWrapper {
// Prepend `self.attrs` to `attrs`.
// FIXME: require passing an NT to prevent misuse of this method
pub(crate) fn prepend_to_nt_inner(self, attrs: &mut AttrVec) {
let mut self_attrs = self.attrs.clone();
let mut self_attrs = self.attrs;
std::mem::swap(attrs, &mut self_attrs);
attrs.extend(self_attrs);
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/json/conversions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ impl FromWithTcx<clean::Type> for Type {
},
QPath(box clean::QPathData { assoc, self_type, trait_, .. }) => Type::QualifiedPath {
name: assoc.name.to_string(),
args: Box::new(assoc.args.clone().into_tcx(tcx)),
args: Box::new(assoc.args.into_tcx(tcx)),
self_type: Box::new(self_type.into_tcx(tcx)),
trait_: trait_.into_tcx(tcx),
},
Expand Down

0 comments on commit 39c16eb

Please sign in to comment.