From 547663f7a571b75acd3f3b68a1c68f1d33e04022 Mon Sep 17 00:00:00 2001 From: Micha Reiser Date: Tue, 6 Aug 2024 08:56:06 +0200 Subject: [PATCH] Fix clippy warnings --- tests/input_default.rs | 6 +++--- tests/input_field_durability.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/input_default.rs b/tests/input_default.rs index 328d59b..5a4d2bd 100644 --- a/tests/input_default.rs +++ b/tests/input_default.rs @@ -16,7 +16,7 @@ fn new_constructor() { let input = MyInput::new(&db, true); - assert_eq!(input.required(&db), true); + assert!(input.required(&db)); assert_eq!(input.optional(&db), 0); } @@ -26,7 +26,7 @@ fn builder_specify_optional() { let input = MyInput::builder(true).optional(20).new(&db); - assert_eq!(input.required(&db), true); + assert!(input.required(&db)); assert_eq!(input.optional(&db), 20); } @@ -38,6 +38,6 @@ fn builder_default_optional_value() { .required_durability(Durability::HIGH) .new(&db); - assert_eq!(input.required(&db), true); + assert!(input.required(&db)); assert_eq!(input.optional(&db), 0); } diff --git a/tests/input_field_durability.rs b/tests/input_field_durability.rs index 7ca579d..b65a512 100644 --- a/tests/input_field_durability.rs +++ b/tests/input_field_durability.rs @@ -19,7 +19,7 @@ fn required_field_durability() { .required_field_durability(Durability::HIGH) .new(&db); - assert_eq!(input.required_field(&db), true); + assert!(input.required_field(&db)); assert_eq!(input.optional_field(&db), 0); } @@ -32,6 +32,6 @@ fn optional_field_durability() { .optional_field_durability(Durability::HIGH) .new(&db); - assert_eq!(input.required_field(&db), true); + assert!(input.required_field(&db)); assert_eq!(input.optional_field(&db), 20); }