qemu/rust/qemu-api/src
Paolo Bonzini 7d0520398f rust: prefer NonNull::new to assertions
Do not use new_unchecked; the effect is the same, but the
code is easier to read and unsafe regions become smaller.
Likewise, NonNull::new can be used instead of assertion and
followed by as_ref() or as_mut() instead of dereferencing the
pointer.

Suggested-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-01-23 18:47:46 +01:00
..
assertions.rs rust: add a utility module for compile-time type checks 2025-01-10 23:34:43 +01:00
bindings.rs rust: build: establish a baseline of lints across all crates 2024-12-10 18:44:06 +01:00
bitops.rs rust: add a bit operation module 2024-12-10 18:49:26 +01:00
c_str.rs rust: introduce a c_str macro 2024-11-05 14:18:16 +01:00
callbacks.rs rust: qemu-api: add a module to wrap functions and zero-sized closures 2024-12-19 19:36:37 +01:00
cell.rs bql: add a "mock" BQL for Rust unit tests 2024-12-19 19:36:37 +01:00
irq.rs rust: qdev: expose inherited methods to subclasses of SysBusDevice 2025-01-10 23:34:44 +01:00
lib.rs rust: add a utility module for compile-time type checks 2025-01-10 23:34:43 +01:00
module.rs rust: rename qemu-api modules to follow C code a bit more 2024-12-19 19:36:37 +01:00
offset_of.rs rust: introduce alternative implementation of offset_of! 2024-11-05 14:18:16 +01:00
prelude.rs rust: vmstate: add new type safe implementation 2025-01-23 11:50:53 +01:00
qdev.rs rust: prefer NonNull::new to assertions 2025-01-23 18:47:46 +01:00
qom.rs rust: prefer NonNull::new to assertions 2025-01-23 18:47:46 +01:00
sysbus.rs rust: qdev: expose inherited methods to subclasses of SysBusDevice 2025-01-10 23:34:44 +01:00
vmstate.rs rust: vmstate: make order of parameters consistent in vmstate_clock 2025-01-23 11:50:53 +01:00
zeroable.rs rust: vmstate: implement Zeroable for VMStateField 2025-01-23 11:50:53 +01:00