summaryrefslogtreecommitdiffstats
path: root/benches
diff options
context:
space:
mode:
authorMikail Bagishov <bagishov.mikail@yandex.ru>2020-09-27 12:07:55 +0300
committerGitHub <noreply@github.com>2020-09-27 11:07:55 +0200
commit99d4061203aa5dbf79b06352b06bc9818a293665 (patch)
treebec720f53625a48890adfef58c12d6512e6b09fb /benches
parentdfdfd61372cca02087c0e2773dc978d03235bc51 (diff)
bench: fix unused_mut lint in benches (#2889)
Diffstat (limited to 'benches')
-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");