From: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-rust@nongnu.org
Subject: Re: [PATCH] rust: vmstate: use "cast()" instead of "as"
Date: Fri, 19 Sep 2025 13:41:28 +0300 [thread overview]
Message-ID: <CAAjaMXa2F-AptpLNy4=LeVRb9FXX6QzzAdVR2PZcqWX6LEYR7Q@mail.gmail.com> (raw)
In-Reply-To: <20250919083625.86678-1-pbonzini@redhat.com>
On Fri, Sep 19, 2025 at 11:37 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> Reported by clippy, fix it.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
> rust/migration/src/vmstate.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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),)?
> --
> 2.51.0
>
>
next prev parent reply other threads:[~2025-09-19 10:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 8:36 [PATCH] rust: vmstate: use "cast()" instead of "as" Paolo Bonzini
2025-09-19 10:41 ` Manos Pitsidianakis [this message]
2025-09-23 14:43 ` Zhao Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAjaMXa2F-AptpLNy4=LeVRb9FXX6QzzAdVR2PZcqWX6LEYR7Q@mail.gmail.com' \
--to=manos.pitsidianakis@linaro.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-rust@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).