From: Paolo Bonzini Date: Wed, 17 Sep 2025 10:40:29 +0000 (+0200) Subject: rust: vmstate: use "cast()" instead of "as" X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=75dbe618ac3895b2889a590de3bc589bf32dc999;p=thirdparty%2Fqemu.git rust: vmstate: use "cast()" instead of "as" Reported by clippy, fix it. Reviewed-by: Manos Pitsidianakis Signed-off-by: Paolo Bonzini --- diff --git a/rust/migration/src/vmstate.rs b/rust/migration/src/vmstate.rs index c05c4a1fd66..e04b19b3c9f 100644 --- a/rust/migration/src/vmstate.rs +++ b/rust/migration/src/vmstate.rs @@ -144,7 +144,7 @@ macro_rules! vmstate_of { $crate::bindings::VMStateField { name: ::core::concat!(::core::stringify!($field_name), "\0") .as_bytes() - .as_ptr() as *const ::std::os::raw::c_char, + .as_ptr().cast::<::std::os::raw::c_char>(), offset: ::std::mem::offset_of!($struct_name, $field_name), $(num_offset: ::std::mem::offset_of!($struct_name, $num),)? $(field_exists: $crate::vmstate_exist_fn!($struct_name, $test_fn),)?