History log of /cloud-hypervisor/hypervisor/src/arch/x86/emulator/instructions/stos.rs (Results 1 – 2 of 2)
Revision Date Author Comments
# 297236a7 30-Sep-2024 Ruoqing He <heruoqing@iscas.ac.cn>

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 wi

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>

show more ...


# 824e83ab 17-Jul-2024 Wei Liu <liuwe@microsoft.com>

hypervisor: x86: emulate STOS

Signed-off-by: Wei Liu <liuwe@microsoft.com>