Skip to content

Commit

Permalink
Fix clippy warnings in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sosthene-nitrokey committed Sep 18, 2024
1 parent 365e73b commit 0f46370
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/derive_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 3 additions & 0 deletions tests/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;

Expand Down

0 comments on commit 0f46370

Please sign in to comment.