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:
Rob Bradford 2021-10-19 15:01:42 +01:00
parent 8a56720b0f
commit 4ae8ee2376

View File

@ -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"),
}