summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--benches/mpsc.rs10
-rw-r--r--benches/signal.rs2
2 files changed, 6 insertions, 6 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();
diff --git a/benches/signal.rs b/benches/signal.rs
index d891326d..3a354c6b 100644
--- a/benches/signal.rs
+++ b/benches/signal.rs
@@ -53,7 +53,7 @@ fn many_signals(bench: &mut Bencher) {
.unwrap();
let spawn_signal = |kind| {
- let mut tx = tx.clone();
+ let tx = tx.clone();
rt.spawn(async move {
let mut signal = signal(kind).expect("failed to create signal");