mirror of
https://github.com/xemu-project/xemu.git
synced 2026-07-11 01:24:41 +02:00
rust: vmstate: use "cast()" instead of "as"
Reported by clippy, fix it. Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
@@ -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),)?
|
||||
|
||||
Reference in New Issue
Block a user