cloud-hypervisor/devices/src
Ruoqing He 297236a7c0 misc: Eliminate use of assert!((...).is_ok())
Asserting on .is_ok()/.is_err() leads to hard to debug failures (as if
the test fails, it will only say "assertion failed: false". We replace
these with `.unwrap()`, which also prints the exact error variant that
was unexpectedly encountered (we can to this these days thanks to
efforts to implement Display and Debug for our error types). If the
assert!((...).is_ok()) was followed by an .unwrap() anyway, we just drop
the assert.

Inspired by and quoted from @roypat.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-10-03 12:03:49 +00:00
..
legacy misc: Eliminate use of assert!((...).is_ok()) 2024-10-03 12:03:49 +00:00
acpi.rs misc: Adapt consistent import style formatting 2024-09-29 13:08:12 +01:00
debug_console.rs misc: Adapt consistent import style formatting 2024-09-29 13:08:12 +01:00
gic.rs misc: Further improve imports styling 2024-09-29 16:13:48 +00:00
interrupt_controller.rs misc: Further improve imports styling 2024-09-29 16:13:48 +00:00
ioapic.rs misc: Adapt consistent import style formatting 2024-09-29 13:08:12 +01:00
lib.rs devices: Add pvmemcontrol device 2024-08-05 22:41:56 +00:00
pvmemcontrol.rs misc: Further improve imports styling 2024-09-29 16:13:48 +00:00
pvpanic.rs misc: Adapt consistent import style formatting 2024-09-29 13:08:12 +01:00
tpm.rs misc: Adapt consistent import style formatting 2024-09-29 13:08:12 +01:00