mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-01 11:05:46 +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 {
|
while unsafe { poll(&mut pollfd, 1, -1) } == -1 {
|
||||||
let e = io::Error::last_os_error();
|
let e = io::Error::last_os_error();
|
||||||
if !matches!(e.kind(), ErrorKind::Interrupted | ErrorKind::WouldBlock) {
|
assert!(
|
||||||
panic!("poll: {}", e);
|
matches!(e.kind(), ErrorKind::Interrupted | ErrorKind::WouldBlock),
|
||||||
}
|
"poll: {}",
|
||||||
|
e
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
assert_eq!(pollfd.revents, POLLERR);
|
assert_eq!(pollfd.revents, POLLERR);
|
||||||
|
Loading…
Reference in New Issue
Block a user