diff --git a/src/runtime-rs/crates/hypervisor/src/ch/inner_hypervisor.rs b/src/runtime-rs/crates/hypervisor/src/ch/inner_hypervisor.rs index 954ce30343..353b2f7978 100644 --- a/src/runtime-rs/crates/hypervisor/src/ch/inner_hypervisor.rs +++ b/src/runtime-rs/crates/hypervisor/src/ch/inner_hypervisor.rs @@ -1052,7 +1052,7 @@ mod tests { set_fake_guest_protection(None); let have_tdx = fs::read(TDX_KVM_PARAMETER_PATH) - .map_or(false, |content| !content.is_empty() && content[0] == b'Y'); + .is_ok_and(|content| !content.is_empty() && content[0] == b'Y'); let protection = task::spawn_blocking(|| -> Result { get_guest_protection() })