diff options
Diffstat (limited to 'benches/mpsc.rs')
-rw-r--r-- | benches/mpsc.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/benches/mpsc.rs b/benches/mpsc.rs index ec07ad8f..2f3fe963 100644 --- a/benches/mpsc.rs +++ b/benches/mpsc.rs @@ -24,7 +24,7 @@ fn create_100_000_medium(b: &mut Bencher) { fn send_medium(b: &mut Bencher) { b.iter(|| { - let (mut tx, mut rx) = mpsc::channel::<Medium>(1000); + let (tx, mut rx) = mpsc::channel::<Medium>(1000); let _ = tx.try_send([0; 64]); @@ -34,7 +34,7 @@ fn send_medium(b: &mut Bencher) { fn send_large(b: &mut Bencher) { b.iter(|| { - let (mut tx, mut rx) = mpsc::channel::<Large>(1000); + let (tx, mut rx) = mpsc::channel::<Large>(1000); let _ = tx.try_send([[0; 64]; 64]); @@ -54,7 +54,7 @@ fn contention_bounded(b: &mut Bencher) { let (tx, mut rx) = mpsc::channel::<usize>(1_000_000); for _ in 0..5 { - let mut tx = tx.clone(); + let tx = tx.clone(); tokio::spawn(async move { for i in 0..1000 { tx.send(i).await.unwrap(); @@ -81,7 +81,7 @@ fn contention_bounded_full(b: &mut Bencher) { let (tx, mut rx) = mpsc::channel::<usize>(100); for _ in 0..5 { - let mut tx = tx.clone(); + let tx = tx.clone(); tokio::spawn(async move { for i in 0..1000 { tx.send(i).await.unwrap(); @@ -132,7 +132,7 @@ fn uncontented_bounded(b: &mut Bencher) { b.iter(|| { rt.block_on(async move { - let (mut tx, mut rx) = mpsc::channel::<usize>(1_000_000); + let (tx, mut rx) = mpsc::channel::<usize>(1_000_000); for i in 0..5000 { tx.send(i).await.unwrap(); |