diff options
author | Zhao Liu <zhao1.liu@intel.com> | 2025-01-23 19:07:28 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-01-28 17:58:09 +0100 |
commit | aaf3778baaa6408460ec6e6636babbdf0b92c101 (patch) | |
tree | 96966d107eb2c01eb0ba957d6c47f098c6b641dc /rust/qemu-api/tests | |
parent | af7edb1d326de0af565b48c663163c7e5050e03c (diff) | |
download | qemu-aaf3778baaa6408460ec6e6636babbdf0b92c101.zip qemu-aaf3778baaa6408460ec6e6636babbdf0b92c101.tar.gz qemu-aaf3778baaa6408460ec6e6636babbdf0b92c101.tar.bz2 |
rust/zeroable: Implement Zeroable with const_zero macro
The `const_zero` crate provides a nice macro to zero type-specific
constants, which doesn't need to enumerates the fields one by one.
Introduce the `const_zero` macro to QEMU (along with its documentation), and
use it to simplify the implementation of `Zeroable` trait.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250123163143.679841-1-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api/tests')
0 files changed, 0 insertions, 0 deletions