mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: 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:
@@ -3518,9 +3518,7 @@ mod tests {
|
||||
}
|
||||
Err(mpsc::TryRecvError::Empty) => {
|
||||
empty += 1;
|
||||
if empty > 5 {
|
||||
panic!("No login on pty");
|
||||
}
|
||||
assert!(!(empty > 5), "No login on pty");
|
||||
}
|
||||
_ => panic!("No login on pty"),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user