Skip to content

Commit

Permalink
Fix clippy errors in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-casperlabs committed Nov 3, 2023
1 parent 268a248 commit 6c248fc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions execution_engine/src/core/runtime/host_function_flag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ mod tests {
assert!(flag.is_in_host_function_scope());

{
#[allow(clippy::redundant_clone)]
let cloned_flag = flag.clone();
assert_eq!(cloned_flag.counter.get(), 1);
assert!(cloned_flag.is_in_host_function_scope());
Expand Down
4 changes: 2 additions & 2 deletions types/src/checksummed_hex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ mod tests {
#[proptest]
fn hex_roundtrip(input: Vec<u8>) {
prop_assert_eq!(
input.clone(),
decode(encode_iter(&input).collect::<String>()).expect("Failed to decode input.")
&input,
&decode(encode_iter(&input).collect::<String>()).expect("Failed to decode input.")
);
}

Expand Down
1 change: 1 addition & 0 deletions types/src/crypto/asymmetric_key/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ fn hash<T: Hash>(data: &T) -> u64 {
}

fn check_ord_and_hash<T: Clone + Ord + PartialOrd + Hash>(low: T, high: T) {
#[allow(clippy::redundant_clone)]
let low_copy = low.clone();

assert_eq!(hash(&low), hash(&low_copy));
Expand Down

0 comments on commit 6c248fc

Please sign in to comment.