This is reported by Clippy in the latest nightly builds.  Take
a reference instead of cloning.

Reported-by: Peter Maydell <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
---
 rust/qemu-macros/src/lib.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/qemu-macros/src/lib.rs b/rust/qemu-macros/src/lib.rs
index ee417bb4b4e..271125185ec 100644
--- a/rust/qemu-macros/src/lib.rs
+++ b/rust/qemu-macros/src/lib.rs
@@ -261,7 +261,7 @@ macro_rules! str_to_c_str {
                 }
             },
         )?;
-        let field_ty = field.ty.clone();
+        let field_ty = &field.ty;
         let (qdev_prop, bitval) = if let Some(bitval) = bitnr {
             (
                 quote! { <#field_ty as ::hwcore::QDevProp>::BIT_INFO },
-- 
2.55.0


Reply via email to