diff --git a/common/nymcoconut/src/scheme/mod.rs b/common/nymcoconut/src/scheme/mod.rs index 3185233543..50c7301409 100644 --- a/common/nymcoconut/src/scheme/mod.rs +++ b/common/nymcoconut/src/scheme/mod.rs @@ -240,7 +240,7 @@ mod tests { #[test] fn unblind_returns_error_if_integrity_check_on_commitment_hash_fails() { let mut params = Parameters::new(2).unwrap(); - let private_attributes = params.n_random_scalars(2 as usize); + let private_attributes = params.n_random_scalars(2_usize); let elgamal_keypair = elgamal::elgamal_keygen(&mut params); let lambda = diff --git a/common/nymcoconut/src/tests/e2e.rs b/common/nymcoconut/src/tests/e2e.rs index a302985fa2..2964100485 100644 --- a/common/nymcoconut/src/tests/e2e.rs +++ b/common/nymcoconut/src/tests/e2e.rs @@ -41,7 +41,7 @@ fn main() -> Result<(), CoconutError> { let blinded_signature = blind_sign( ¶ms, &keypair.secret_key(), - &elgamal_keypair.public_key(), + elgamal_keypair.public_key(), &blind_sign_request, &public_attributes, )?; @@ -57,8 +57,8 @@ fn main() -> Result<(), CoconutError> { signature .unblind( ¶ms, - &elgamal_keypair.private_key(), - &verification_key, + elgamal_keypair.private_key(), + verification_key, &private_attributes, &public_attributes, &blind_sign_request.get_commitment_hash(), diff --git a/common/nymsphinx/chunking/src/fragment.rs b/common/nymsphinx/chunking/src/fragment.rs index 69a5042af6..58c1baa78a 100644 --- a/common/nymsphinx/chunking/src/fragment.rs +++ b/common/nymsphinx/chunking/src/fragment.rs @@ -923,7 +923,7 @@ mod fragment_header { let header_bytes = fragmented_header.to_bytes(); let header_bytes = &header_bytes[..header_bytes.len() - 1]; - assert!(FragmentHeader::try_from_bytes(&header_bytes).is_err()) + assert!(FragmentHeader::try_from_bytes(header_bytes).is_err()) } #[test] diff --git a/common/nymsphinx/chunking/src/reconstruction.rs b/common/nymsphinx/chunking/src/reconstruction.rs index 9901cfa055..ecd7c6fb85 100644 --- a/common/nymsphinx/chunking/src/reconstruction.rs +++ b/common/nymsphinx/chunking/src/reconstruction.rs @@ -446,7 +446,7 @@ mod reconstruction_buffer { .collect(); for raw_fragment in raw_fragments.iter().take(u8::max_value() as usize - 1) { - buf.insert_fragment(Fragment::try_from_bytes(&raw_fragment).unwrap()); + buf.insert_fragment(Fragment::try_from_bytes(raw_fragment).unwrap()); } assert!(!buf.is_complete); @@ -1268,7 +1268,7 @@ mod message_reconstructor { .collect(); for raw_fragment in raw_fragments.iter().take(u8::max_value() as usize) { - set_buf1.insert_fragment(Fragment::try_from_bytes(&raw_fragment).unwrap()); + set_buf1.insert_fragment(Fragment::try_from_bytes(raw_fragment).unwrap()); } set_buf2.insert_fragment(Fragment::try_from_bytes(&raw_fragments[255]).unwrap()); diff --git a/common/nymsphinx/cover/src/lib.rs b/common/nymsphinx/cover/src/lib.rs index 6b78559ac3..3a545dbaa0 100644 --- a/common/nymsphinx/cover/src/lib.rs +++ b/common/nymsphinx/cover/src/lib.rs @@ -162,7 +162,7 @@ mod tests { #[test] fn is_cover_works_for_identical_input() { - assert!(is_cover(&LOOP_COVER_MESSAGE_PAYLOAD)) + assert!(is_cover(LOOP_COVER_MESSAGE_PAYLOAD)) } #[test]