rust: qemu-macros: remove redundant clone()
PATCH 1/1 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 <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>
--- rust/qemu-macros/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
rust/qemu-macros/src/lib.rs +1 -1
@@ -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 },
Signature · 1 line
2.55.0
Quoted 8 lines · Paolo Bonzini
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(-)
Reviewed-by Philippe Mathieu-Daudé <[email protected]>