From 9fd92512a2af491cbf97a90d7af98e68e04f979d Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Mon, 25 Jan 2021 00:16:10 -0500 Subject: [PATCH] Use equality assert macros (#2969) --- crates/nu-command/tests/commands/which.rs | 6 +++--- crates/nu-engine/src/deserializer.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/nu-command/tests/commands/which.rs b/crates/nu-command/tests/commands/which.rs index 677154884a..bc439673e7 100644 --- a/crates/nu-command/tests/commands/which.rs +++ b/crates/nu-command/tests/commands/which.rs @@ -65,7 +65,7 @@ fn multiple_reports_of_multiple_alias() { ); let count: i32 = actual.out.parse().unwrap(); - assert!(count == 2); + assert_eq!(count, 2); } #[ignore] @@ -77,7 +77,7 @@ fn multiple_reports_of_multiple_defs() { ); let count: i32 = actual.out.parse().unwrap(); - assert!(count == 2); + assert_eq!(count, 2); } //Fails due to ParserScope::add_definition @@ -92,5 +92,5 @@ fn def_only_seen_once() { ); //count is 2. One custom_command (def) one built in ("wrongly" added) let count: i32 = actual.out.parse().unwrap(); - assert!(count == 1); + assert_eq!(count, 1); } diff --git a/crates/nu-engine/src/deserializer.rs b/crates/nu-engine/src/deserializer.rs index 763de1b31e..0c2ed94467 100644 --- a/crates/nu-engine/src/deserializer.rs +++ b/crates/nu-engine/src/deserializer.rs @@ -602,8 +602,8 @@ mod tests { let tuple = type_name::<()>(); let tagged_tuple = type_name::>(); let tagged_value = type_name::(); - assert!(tuple != tagged_tuple); - assert!(tuple != tagged_value); - assert!(tagged_tuple != tagged_value); + assert_ne!(tuple, tagged_tuple); + assert_ne!(tuple, tagged_value); + assert_ne!(tagged_tuple, tagged_value); } }