Skip to content

Commit a680174

Browse files
committed
satisfy clippy
1 parent afc6fc1 commit a680174

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/tls_listener.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,11 @@ impl<State: Clone + Send + Sync + 'static> Listener<State> for TlsListener {
166166
}
167167

168168
fn is_transient_error(e: &io::Error) -> bool {
169-
match e.kind() {
170-
io::ErrorKind::ConnectionRefused
171-
| io::ErrorKind::ConnectionAborted
172-
| io::ErrorKind::ConnectionReset => true,
173-
_ => false,
174-
}
169+
use io::ErrorKind::*;
170+
matches!(
171+
e.kind(),
172+
ConnectionRefused | ConnectionAborted | ConnectionReset
173+
)
175174
}
176175

177176
impl Display for TlsListener {

0 commit comments

Comments
 (0)