remove redundant clones
This commit is contained in:
parent
b88e510cc8
commit
57198b549f
2 changed files with 2 additions and 2 deletions
|
@ -52,7 +52,7 @@ impl AttrWrapper {
|
||||||
// Prepend `self.attrs` to `attrs`.
|
// Prepend `self.attrs` to `attrs`.
|
||||||
// FIXME: require passing an NT to prevent misuse of this method
|
// FIXME: require passing an NT to prevent misuse of this method
|
||||||
pub(crate) fn prepend_to_nt_inner(self, attrs: &mut AttrVec) {
|
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);
|
std::mem::swap(attrs, &mut self_attrs);
|
||||||
attrs.extend(self_attrs);
|
attrs.extend(self_attrs);
|
||||||
}
|
}
|
||||||
|
|
|
@ -486,7 +486,7 @@ impl FromWithTcx<clean::Type> for Type {
|
||||||
},
|
},
|
||||||
QPath(box clean::QPathData { assoc, self_type, trait_, .. }) => Type::QualifiedPath {
|
QPath(box clean::QPathData { assoc, self_type, trait_, .. }) => Type::QualifiedPath {
|
||||||
name: assoc.name.to_string(),
|
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)),
|
self_type: Box::new(self_type.into_tcx(tcx)),
|
||||||
trait_: trait_.into_tcx(tcx),
|
trait_: trait_.into_tcx(tcx),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue