Skip to content

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
matheus23 committed Jan 8, 2025
1 parent 2bee7fc commit 2224a10
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions iroh/src/magicsock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4096,7 +4096,7 @@ mod tests {
tasks.spawn({
let queue = queue.clone();
async move {
let mut expected_msgs: BTreeSet<usize> = (0..capacity).into_iter().collect();
let mut expected_msgs: BTreeSet<usize> = (0..capacity).collect();
while !expected_msgs.is_empty() {
let datagram = futures_lite::future::poll_fn(|cx| {
queue.poll_recv(cx).map(|result| result.unwrap())
Expand Down Expand Up @@ -4131,7 +4131,10 @@ mod tests {
}

// We expect all of this work to be done in 10 seconds max.
if let Err(_) = tokio::time::timeout(Duration::from_secs(10), tasks.join_all()).await {
if tokio::time::timeout(Duration::from_secs(10), tasks.join_all())
.await
.is_err()
{
panic!("Timeout - not all messages between 0 and {capacity} received.");
}
}
Expand Down

0 comments on commit 2224a10

Please sign in to comment.