From: Zhao Liu Date: Sat, 20 Sep 2025 16:05:11 +0000 (+0800) Subject: rust/qemu-macros: Fix Clippy's complaints about lambda parameter naming X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1bbac0ca88cdfd6ac019685a855c92831e3862e3;p=thirdparty%2Fqemu.git rust/qemu-macros: Fix Clippy's complaints about lambda parameter naming error: `rename` shadows a previous, unrelated binding --> qemu-macros/src/lib.rs:265:14 | 265 | |rename| -> Result { | ^^^^^^ | note: previous binding is here --> qemu-macros/src/lib.rs:245:30 | 245 | let DeviceProperty { rename, defval } = prop; | ^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#shadow_unrelated = note: requested on the command line with `-D clippy::shadow-unrelated` Rename the lambda parameter to "prop_rename" to fix the above clippy error. Reviewed-by: Manos Pitsidianakis Signed-off-by: Zhao Liu Signed-off-by: Paolo Bonzini Link: https://lore.kernel.org/r/20250920160520.3699591-4-zhao1.liu@intel.com --- diff --git a/rust/qemu-macros/src/lib.rs b/rust/qemu-macros/src/lib.rs index 7ab18061776..37e1b723bd5 100644 --- a/rust/qemu-macros/src/lib.rs +++ b/rust/qemu-macros/src/lib.rs @@ -242,8 +242,8 @@ fn derive_device_or_error(input: DeriveInput) -> Result Result { - match rename { + |prop_rename| -> Result { + match prop_rename { DevicePropertyName::CStr(cstr_lit) => Ok(quote! { #cstr_lit }), DevicePropertyName::Str(str_lit) => { str_to_c_str!(str_lit.value(), str_lit.span())