rust: qemu-macros: remove redundant clone()
This is reported by Clippy in the latest nightly builds. Take a reference instead of cloning. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
1 parent
3ab8a15569
commit
e43092b0ce
1 file changed
+1
-1
@@ -261,7 +261,7 @@ fn derive_device_or_error(input: DeriveInput) -> Result<proc_macro2::TokenStream
|
||||
}
|
||||
},
|
||||
)?;
|
||||
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 },
|
||||
|
||||
Reference in new issue
Block a user