qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/5] rust: use inline const expressions


From: Paolo Bonzini
Subject: Re: [PATCH 2/5] rust: use inline const expressions
Date: Tue, 6 May 2025 12:56:34 +0200

On Tue, May 6, 2025 at 10:51 AM Zhao Liu <zhao1.liu@intel.com> wrote:
> > -        let _: () = CanReceiveFn::ASSERT_IS_SOME;
> > +        const { assert!(CanReceiveFn::IS_SOME) };
>
> Do you think it's a good idea to warp this as a helper for easy
> callback calls?

I think the wrapper would be very similar to what exists before this
patch, wouldn't it? The const { assert!(...) } seems clear enough and
not too verbose.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]