diff --git a/.clippy.toml b/.clippy.toml index b3c3a24c90..8f7dac5dc3 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -1 +1 @@ -msrv = "1.63.0" +msrv = "1.71.0" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eba3631339..b7f538e8a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -804,7 +804,7 @@ jobs: - uses: actions-rs/toolchain@v1.0.7 id: toolchain with: - toolchain: 1.70.0 + toolchain: stable profile: minimal override: true components: clippy,rustfmt @@ -817,11 +817,11 @@ jobs: - name: Run clippy working-directory: tools/xdp - run: cargo clippy + run: cargo +stable clippy - name: Build ebpf working-directory: tools/xdp env: RUST_LOG: trace - run: cargo xtask ci + run: cargo +stable xtask ci diff --git a/.github/workflows/qns.yml b/.github/workflows/qns.yml index 4ebe7f1cfa..7213a87544 100644 --- a/.github/workflows/qns.yml +++ b/.github/workflows/qns.yml @@ -604,7 +604,7 @@ jobs: - name: Run cargo build working-directory: tools/${{ matrix.attack }}-attack - run: cargo build --release + run: cargo +stable build --release - name: Start client working-directory: tools/${{ matrix.attack }}-attack diff --git a/quic/s2n-quic-core/src/packet/number/tests.rs b/quic/s2n-quic-core/src/packet/number/tests.rs index 4f1dc786df..ab13d222f9 100644 --- a/quic/s2n-quic-core/src/packet/number/tests.rs +++ b/quic/s2n-quic-core/src/packet/number/tests.rs @@ -105,7 +105,6 @@ fn new(value: VarInt) -> PacketNumber { /// This implementation tries to closely follow the RFC pseudo code so it's /// easier to ensure it matches. -#[allow(clippy::blocks_in_if_conditions)] fn rfc_decoder(largest_pn: u64, truncated_pn: u64, pn_nbits: usize) -> u64 { macro_rules! catch { ($expr:expr) => { diff --git a/quic/s2n-quic-transport/src/connection/connection_container.rs b/quic/s2n-quic-transport/src/connection/connection_container.rs index 2a953d33f3..7b21b5e562 100644 --- a/quic/s2n-quic-transport/src/connection/connection_container.rs +++ b/quic/s2n-quic-transport/src/connection/connection_container.rs @@ -842,11 +842,13 @@ impl> ConnectionContainer { let cursor = self.connection_map.find(&connection_id); let node = cursor.get()?; - let (result, interests) = match node.inner.write(|conn| { + let on_write = |conn: &mut C| { let result = func(conn); let interests = conn.interests(); (result, interests) - }) { + }; + + let (result, interests) = match node.inner.write(on_write) { Ok(result) => result, Err(_) => { // the connection panicked so remove it from the container @@ -992,7 +994,7 @@ impl> ConnectionContainer { // also clear the timer to make the state consistent connection.timeout.set(None); - let mut interests = match connection.inner.write(|conn| { + let on_write = |conn: &mut C| { let remote_address = conn .remote_address() .expect("Remote address should be available"); @@ -1004,7 +1006,9 @@ impl> ConnectionContainer { ); func(conn, &context); conn.interests() - }) { + }; + + let mut interests = match connection.inner.write(on_write) { Ok(result) => result, Err(_) => { self.remove_poisoned_node(&connection);