From 0f46370a0c9011bc464685d9208d6c55a776ab0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sosth=C3=A8ne=20Gu=C3=A9don?= Date: Wed, 18 Sep 2024 12:03:42 +0200 Subject: [PATCH] Fix clippy warnings in tests --- examples/derive_enum.rs | 8 ++++---- tests/derive.rs | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/derive_enum.rs b/examples/derive_enum.rs index a44a97c..3009f06 100644 --- a/examples/derive_enum.rs +++ b/examples/derive_enum.rs @@ -10,15 +10,15 @@ use arbitrary::{Arbitrary, Unstructured}; #[derive(Arbitrary, Debug)] enum MyEnum { - UnitVariant, - TupleVariant(bool, u32), - StructVariant { + Unit, + Tuple(bool, u32), + Struct { x: i8, y: (u8, i32), }, #[arbitrary(skip)] - SkippedVariant(usize), + Skipped(usize), } fn main() { diff --git a/tests/derive.rs b/tests/derive.rs index bca6cfe..cda53bd 100644 --- a/tests/derive.rs +++ b/tests/derive.rs @@ -2,6 +2,9 @@ // Various structs/fields that we are deriving `Arbitrary` for aren't actually // used except to exercise the derive. #![allow(dead_code)] +// Various assert_eq! are used to compare result of bool amongst other data types +// In this case, using assert! is less explicit and readable +#![allow(clippy::bool_assert_comparison)] use arbitrary::*;