mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-05 21:15:45 +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:
parent
8a56720b0f
commit
4ae8ee2376
@ -3518,9 +3518,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
Err(mpsc::TryRecvError::Empty) => {
|
Err(mpsc::TryRecvError::Empty) => {
|
||||||
empty += 1;
|
empty += 1;
|
||||||
if empty > 5 {
|
assert!(!(empty > 5), "No login on pty");
|
||||||
panic!("No login on pty");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
_ => panic!("No login on pty"),
|
_ => panic!("No login on pty"),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user