diff --git a/test-distro/src/init.rs b/test-distro/src/init.rs index 49cc94f2..5833adc0 100644 --- a/test-distro/src/init.rs +++ b/test-distro/src/init.rs @@ -195,6 +195,10 @@ fn main() { } } let how = nix::sys::reboot::RebootMode::RB_POWER_OFF; - let _: std::convert::Infallible = nix::sys::reboot::reboot(how) - .unwrap_or_else(|err| panic!("reboot({how:?}) failed: {err:?}")); + match nix::sys::reboot::reboot(how) { + Ok(infallible) => match infallible {}, + Err(err) => { + panic!("reboot({how:?}) failed: {err:?}") + } + } }