Skip to content

Commit 6a1ffbf

Browse files
committed
mpsc: fix fmt
1 parent 2ee4f76 commit 6a1ffbf

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tokio/tests/sync_mpsc.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -571,11 +571,11 @@ async fn try_reserve_many_fails() {
571571
drop(permit1);
572572
drop(permit2);
573573

574-
// It is possible to reserve all the permits
574+
// It is possible to reserve all the permits
575575
assert_ok!(tx.try_reserve_many(i));
576-
576+
577577
// This should fail because the channel is closed
578-
drop(rx);
578+
drop(rx);
579579
match assert_err!(tx.try_reserve_many(3)) {
580580
TrySendError::Closed(()) => {}
581581
_ => panic!(),
@@ -585,14 +585,14 @@ async fn try_reserve_many_fails() {
585585

586586
#[maybe_tokio_test]
587587
async fn reserve_many_and_send() {
588-
let (tx, mut rx) = mpsc::channel(100);
589-
for i in 1..100 {
590-
for permit in assert_ok!(tx.reserve_many(i).await) {
591-
permit.send("foo");
592-
assert_eq!(rx.recv().await, Some("foo"));
593-
}
594-
assert_eq!(rx.try_recv(), Err(TryRecvError::Empty));
595-
}
588+
let (tx, mut rx) = mpsc::channel(100);
589+
for i in 1..100 {
590+
for permit in assert_ok!(tx.reserve_many(i).await) {
591+
permit.send("foo");
592+
assert_eq!(rx.recv().await, Some("foo"));
593+
}
594+
assert_eq!(rx.try_recv(), Err(TryRecvError::Empty));
595+
}
596596
}
597597

598598
#[tokio::test]
@@ -642,7 +642,7 @@ async fn dropping_rx_closes_channel() {
642642

643643
drop(rx);
644644
assert_err!(tx.reserve().await);
645-
assert_err!(tx.reserve_many(10).await);
645+
assert_err!(tx.reserve_many(10).await);
646646
assert_eq!(1, Arc::strong_count(&msg));
647647
}
648648

0 commit comments

Comments
 (0)