Skip to content

Commit 57198b5

Browse files
committed
remove redundant clones
1 parent b88e510 commit 57198b5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_parse/src/parser/attr_wrapper.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl AttrWrapper {
5252
// Prepend `self.attrs` to `attrs`.
5353
// FIXME: require passing an NT to prevent misuse of this method
5454
pub(crate) fn prepend_to_nt_inner(self, attrs: &mut AttrVec) {
55-
let mut self_attrs = self.attrs.clone();
55+
let mut self_attrs = self.attrs;
5656
std::mem::swap(attrs, &mut self_attrs);
5757
attrs.extend(self_attrs);
5858
}

src/librustdoc/json/conversions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ impl FromWithTcx<clean::Type> for Type {
486486
},
487487
QPath(box clean::QPathData { assoc, self_type, trait_, .. }) => Type::QualifiedPath {
488488
name: assoc.name.to_string(),
489-
args: Box::new(assoc.args.clone().into_tcx(tcx)),
489+
args: Box::new(assoc.args.into_tcx(tcx)),
490490
self_type: Box::new(self_type.into_tcx(tcx)),
491491
trait_: trait_.into_tcx(tcx),
492492
},

0 commit comments

Comments
 (0)