From 4ae8ee2376aec3ff4b64a8022e01f4d58958985c Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Tue, 19 Oct 2021 15:01:42 +0100 Subject: [PATCH] tests: Use assert!() rather than if+panic As identified by the new beta clippy. Signed-off-by: Rob Bradford --- tests/integration.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/integration.rs b/tests/integration.rs index 868f5f48c..d30ad793c 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -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"), }