Skip to content

Commit 129fefd

Browse files
authored
Clippy (#18)
1 parent 2f9941b commit 129fefd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/endpoint/endpoint_test.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ impl TestEndpoint {
115115
}
116116
}
117117

118-
while self.inbound.front().map_or(false, |x| x.0 <= now) {
118+
while self.inbound.front().is_some_and(|x| x.0 <= now) {
119119
let (recv_time, ecn, packet) = self.inbound.pop_front().unwrap();
120120
if let Some((ch, event)) = self.endpoint.handle(recv_time, remote, None, ecn, packet) {
121121
match event {
@@ -136,7 +136,7 @@ impl TestEndpoint {
136136

137137
let mut endpoint_events: Vec<(AssociationHandle, EndpointEvent)> = vec![];
138138
for (ch, conn) in self.associations.iter_mut() {
139-
if self.timeout.map_or(false, |x| x <= now) {
139+
if self.timeout.is_some_and(|x| x <= now) {
140140
self.timeout = None;
141141
conn.handle_timeout(now);
142142
}
@@ -328,12 +328,12 @@ impl Pair {
328328
fn finish_connect(&mut self, client_ch: AssociationHandle, server_ch: AssociationHandle) {
329329
assert_matches!(
330330
self.client_conn_mut(client_ch).poll(),
331-
Some(Event::Connected { .. })
331+
Some(Event::Connected)
332332
);
333333

334334
assert_matches!(
335335
self.server_conn_mut(server_ch).poll(),
336-
Some(Event::Connected { .. })
336+
Some(Event::Connected)
337337
);
338338
}
339339

0 commit comments

Comments
 (0)