Skip to content

Commit 0dfb5b8

Browse files
committed
fix: address clippy 1.76
1 parent 7152a0c commit 0dfb5b8

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.clippy.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
msrv = "1.63.0"
1+
msrv = "1.71.0"

quic/s2n-quic-transport/src/connection/connection_container.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -842,11 +842,13 @@ impl<C: connection::Trait, L: connection::Lock<C>> ConnectionContainer<C, L> {
842842
let cursor = self.connection_map.find(&connection_id);
843843
let node = cursor.get()?;
844844

845-
let (result, interests) = match node.inner.write(|conn| {
845+
let on_write = |conn: &mut C| {
846846
let result = func(conn);
847847
let interests = conn.interests();
848848
(result, interests)
849-
}) {
849+
};
850+
851+
let (result, interests) = match node.inner.write(on_write) {
850852
Ok(result) => result,
851853
Err(_) => {
852854
// the connection panicked so remove it from the container
@@ -992,7 +994,7 @@ impl<C: connection::Trait, L: connection::Lock<C>> ConnectionContainer<C, L> {
992994
// also clear the timer to make the state consistent
993995
connection.timeout.set(None);
994996

995-
let mut interests = match connection.inner.write(|conn| {
997+
let on_write = |conn: &mut C| {
996998
let remote_address = conn
997999
.remote_address()
9981000
.expect("Remote address should be available");
@@ -1004,7 +1006,9 @@ impl<C: connection::Trait, L: connection::Lock<C>> ConnectionContainer<C, L> {
10041006
);
10051007
func(conn, &context);
10061008
conn.interests()
1007-
}) {
1009+
};
1010+
1011+
let mut interests = match connection.inner.write(on_write) {
10081012
Ok(result) => result,
10091013
Err(_) => {
10101014
self.remove_poisoned_node(&connection);

0 commit comments

Comments
 (0)