diff options
| -rw-r--r-- | crates/arti-client/examples/one_hop_circuit.rs | 4 | ||||
| -rw-r--r-- | crates/hashx/tests/hashx_vectors.rs | 12 | ||||
| -rw-r--r-- | crates/tor-hsservice/src/pow/v1.rs | 1 | ||||
| -rw-r--r-- | crates/tor-proto/src/tunnel/circuit.rs | 2 |
4 files changed, 10 insertions, 9 deletions
diff --git a/crates/arti-client/examples/one_hop_circuit.rs b/crates/arti-client/examples/one_hop_circuit.rs index ff07c4a70..d355b8622 100644 --- a/crates/arti-client/examples/one_hop_circuit.rs +++ b/crates/arti-client/examples/one_hop_circuit.rs @@ -38,8 +38,8 @@ async fn launch_one_hop_dir_circ<R: Runtime>( let circuit = arti_client.circmgr().deref(); let one_hop_circ = circuit.get_or_launch_dir_specific(&relay).await; match one_hop_circ { - Err(e) => println!("[-] Unable to launch one-hop circuit: {}", e), - Ok(_) => println!("[+] Successful one-hop circuit to: {:?}", fp), + Err(e) => println!("[-] Unable to launch one-hop circuit: {e}"), + Ok(_) => println!("[+] Successful one-hop circuit to: {fp:?}"), }; } else { println!("Could not find a relay suitable for a directory request."); diff --git a/crates/hashx/tests/hashx_vectors.rs b/crates/hashx/tests/hashx_vectors.rs index 1c1924dfa..176ae2619 100644 --- a/crates/hashx/tests/hashx_vectors.rs +++ b/crates/hashx/tests/hashx_vectors.rs @@ -18,7 +18,7 @@ const HASH_SEED2_987654321123456789: [u8; 32] = #[test] fn seed1() { let func = HashX::new(SEED1).unwrap(); - println!("{:?}\n", func); + println!("{func:?}\n"); assert_eq!(func.hash_to_u64(0), 0x98eacb7d56542f2b); assert_eq!(func.hash_to_u64(123456), 0xaf937ca60ad5bdae); assert_eq!(func.hash_to_bytes(0), HASH_SEED1_0); @@ -28,7 +28,7 @@ fn seed1() { #[test] fn seed2() { let func = HashX::new(SEED2).unwrap(); - println!("{:?}\n", func); + println!("{func:?}\n"); assert_eq!(func.hash_to_u64(123456), 0xaab0bbf45b153dab); assert_eq!(func.hash_to_u64(987654321123456789), 0x7432327c49f0fe8d); assert_eq!(func.hash_to_bytes(123456), HASH_SEED2_123456); @@ -44,7 +44,7 @@ fn seed1_interp() { .runtime(hashx::RuntimeOption::InterpretOnly) .build(SEED1) .unwrap(); - println!("{:?}\n", func); + println!("{func:?}\n"); assert_eq!(func.hash_to_bytes(0), HASH_SEED1_0); assert_eq!(func.hash_to_bytes(123456), HASH_SEED1_123456); } @@ -55,7 +55,7 @@ fn seed2_interp() { .runtime(hashx::RuntimeOption::InterpretOnly) .build(SEED2) .unwrap(); - println!("{:?}\n", func); + println!("{func:?}\n"); assert_eq!(func.hash_to_bytes(123456), HASH_SEED2_123456); assert_eq!( func.hash_to_bytes(987654321123456789), @@ -92,7 +92,7 @@ fn seed1_compile() { .runtime(hashx::RuntimeOption::CompileOnly) .build(SEED1) .unwrap(); - println!("{:?}\n", func); + println!("{func:?}\n"); assert_eq!(func.hash_to_bytes(0), HASH_SEED1_0); assert_eq!(func.hash_to_bytes(123456), HASH_SEED1_123456); } @@ -107,7 +107,7 @@ fn seed2_compile() { .runtime(hashx::RuntimeOption::CompileOnly) .build(SEED2) .unwrap(); - println!("{:?}\n", func); + println!("{func:?}\n"); assert_eq!(func.hash_to_bytes(123456), HASH_SEED2_123456); assert_eq!( func.hash_to_bytes(987654321123456789), diff --git a/crates/tor-hsservice/src/pow/v1.rs b/crates/tor-hsservice/src/pow/v1.rs index f3015ddf8..4629b0417 100644 --- a/crates/tor-hsservice/src/pow/v1.rs +++ b/crates/tor-hsservice/src/pow/v1.rs @@ -308,6 +308,7 @@ impl<R: Runtime> PowManager<R> { /// This also pokes the publisher when needed to cause rotated seeds to be published. /// /// Returns the next time this function should be called again. + #[allow(clippy::cognitive_complexity)] async fn rotate_seeds_if_expiring(&self) -> Option<SystemTime> { let mut expired_verifiers = vec![]; let mut new_verifiers = vec![]; diff --git a/crates/tor-proto/src/tunnel/circuit.rs b/crates/tor-proto/src/tunnel/circuit.rs index 3eca5efff..23556fd03 100644 --- a/crates/tor-proto/src/tunnel/circuit.rs +++ b/crates/tor-proto/src/tunnel/circuit.rs @@ -3306,7 +3306,7 @@ pub(crate) mod test { /// Structure for returning the sinks, channels, etc. that must stay /// alive until the test is complete. - #[allow(unused)] + #[allow(unused, clippy::large_enum_variant)] #[derive(Debug)] #[cfg(feature = "conflux")] enum ConfluxEndpointResult { |
