diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 431f6d8..83574b3 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -104,7 +104,7 @@ jobs: - run: cargo update -Z minimal-versions # Now check that `cargo build` works with respect to the oldest possible # deps and the stated MSRV. 1.70 should work for all - - uses: dtolnay/rust-toolchain@1.75.0 + - uses: dtolnay/rust-toolchain@1.77.0 - run: cargo test --workspace --all-targets --all-features # Also make sure the AVX2 build works - run: cargo build --target x86_64-unknown-linux-gnu diff --git a/crates/obfs4/src/handshake/handshake_server.rs b/crates/obfs4/src/handshake/handshake_server.rs index d75222b..6de594a 100644 --- a/crates/obfs4/src/handshake/handshake_server.rs +++ b/crates/obfs4/src/handshake/handshake_server.rs @@ -20,21 +20,18 @@ pub(crate) struct HandshakeMaterials { pub(crate) len_seed: [u8; SEED_LENGTH], } -impl<'a> HandshakeMaterials { +impl HandshakeMaterials { pub fn get_hmac(&self) -> HmacSha256 { let mut key = self.identity_keys.pk.pk.as_bytes().to_vec(); key.append(&mut self.identity_keys.pk.id.as_bytes().to_vec()); HmacSha256::new_from_slice(&key[..]).unwrap() } - pub fn new<'b>( - identity_keys: &'b Obfs4NtorSecretKey, + pub fn new( + identity_keys: &Obfs4NtorSecretKey, session_id: String, len_seed: [u8; SEED_LENGTH], - ) -> Self - where - 'b: 'a, - { + ) -> Self { HandshakeMaterials { identity_keys: identity_keys.clone(), session_id, diff --git a/crates/obfs4/src/test_utils/fake_prng.rs b/crates/obfs4/src/test_utils/fake_prng.rs index 916e889..fecdb70 100644 --- a/crates/obfs4/src/test_utils/fake_prng.rs +++ b/crates/obfs4/src/test_utils/fake_prng.rs @@ -6,7 +6,7 @@ impl<'a> FakePRNG<'a> { Self { bytes } } } -impl<'a> rand_core::RngCore for FakePRNG<'a> { +impl rand_core::RngCore for FakePRNG<'_> { fn next_u32(&mut self) -> u32 { rand_core::impls::next_u32_via_fill(self) }