mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 03:12:27 +00:00
vmm: Use assert!() rather than if+panic
As identified by the new beta clippy. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
48d4ccbfeb
commit
e9ea9d63f8
@ -94,9 +94,11 @@ fn sigwinch_listener_main(seccomp_filter: BpfProgram, tx: File, tty: &File) -> !
|
||||
|
||||
while unsafe { poll(&mut pollfd, 1, -1) } == -1 {
|
||||
let e = io::Error::last_os_error();
|
||||
if !matches!(e.kind(), ErrorKind::Interrupted | ErrorKind::WouldBlock) {
|
||||
panic!("poll: {}", e);
|
||||
}
|
||||
assert!(
|
||||
matches!(e.kind(), ErrorKind::Interrupted | ErrorKind::WouldBlock),
|
||||
"poll: {}",
|
||||
e
|
||||
);
|
||||
}
|
||||
|
||||
assert_eq!(pollfd.revents, POLLERR);
|
||||
|
Loading…
x
Reference in New Issue
Block a user