From 57198b549f20a63650113b11b806f535a9d35fbb Mon Sep 17 00:00:00 2001 From: Matthias Krüger Date: Sat, 3 Sep 2022 07:58:41 +0200 Subject: remove redundant clones --- compiler/rustc_parse/src/parser/attr_wrapper.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_parse/src/parser') 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); } -- cgit 1.4.1-3-g733a5