diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-09-03 07:58:41 +0200 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2022-09-03 07:58:41 +0200 |
| commit | 57198b549f20a63650113b11b806f535a9d35fbb (patch) | |
| tree | 6c7098399fa2e4c3fbaec0847499292378d8f964 /compiler/rustc_parse/src/parser | |
| parent | b88e510cc886e4c367d90e1c7c36013a4bc0d6ab (diff) | |
| download | rust-57198b549f20a63650113b11b806f535a9d35fbb.tar.gz rust-57198b549f20a63650113b11b806f535a9d35fbb.zip | |
remove redundant clones
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/attr_wrapper.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/attr_wrapper.rs b/compiler/rustc_parse/src/parser/attr_wrapper.rs index f353ee6df9b..2e58605cf19 100644 --- a/compiler/rustc_parse/src/parser/attr_wrapper.rs +++ b/compiler/rustc_parse/src/parser/attr_wrapper.rs @@ -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); } |
