Home
last modified time | relevance | path

Searched hist:"7 d0520398f7f58214cf5242b34c1b46efa2fcf4f" (Results 1 – 4 of 4) sorted by relevance

/qemu/rust/qemu-api/src/
H A Dqdev.rs7d0520398f7f58214cf5242b34c1b46efa2fcf4f Thu Jan 23 10:25:22 UTC 2025 Paolo Bonzini <pbonzini@redhat.com> 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>
H A Dqom.rs7d0520398f7f58214cf5242b34c1b46efa2fcf4f Thu Jan 23 10:25:22 UTC 2025 Paolo Bonzini <pbonzini@redhat.com> 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>
/qemu/rust/hw/char/pl011/src/
H A Ddevice_class.rs7d0520398f7f58214cf5242b34c1b46efa2fcf4f Thu Jan 23 10:25:22 UTC 2025 Paolo Bonzini <pbonzini@redhat.com> 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>
H A Ddevice.rs7d0520398f7f58214cf5242b34c1b46efa2fcf4f Thu Jan 23 10:25:22 UTC 2025 Paolo Bonzini <pbonzini@redhat.com> 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>