mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-23 00:00:10 +02:00
sync: fix warnings in benches and tests (#912)
This commit is contained in:
committed by
Carl Lerche
parent
75ab7c9e9b
commit
beb639a030
@@ -1,4 +1,5 @@
|
||||
#![feature(test)]
|
||||
#![cfg_attr(test, deny(warnings))]
|
||||
|
||||
extern crate tokio_sync;
|
||||
extern crate futures;
|
||||
@@ -51,7 +52,7 @@ mod tokio {
|
||||
|
||||
#[bench]
|
||||
fn bounded_tx_poll_ready(b: &mut Bencher) {
|
||||
let (mut tx, rx) = channel::<i32>(1);
|
||||
let (mut tx, _rx) = channel::<i32>(1);
|
||||
b.iter(|| {
|
||||
future::lazy(|| {
|
||||
assert!(tx.poll_ready().unwrap().is_ready());
|
||||
@@ -63,7 +64,7 @@ mod tokio {
|
||||
|
||||
#[bench]
|
||||
fn bounded_tx_poll_not_ready(b: &mut Bencher) {
|
||||
let (mut tx, rx) = channel::<i32>(1);
|
||||
let (mut tx, _rx) = channel::<i32>(1);
|
||||
tx.try_send(1).unwrap();
|
||||
b.iter(|| {
|
||||
future::lazy(|| {
|
||||
@@ -163,7 +164,7 @@ mod tokio {
|
||||
.take(4 * 1_000);
|
||||
|
||||
for v in rx {
|
||||
test::black_box(v);
|
||||
let _ = test::black_box(v);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -209,7 +210,7 @@ mod tokio {
|
||||
.take(THREADS * ITERS);
|
||||
|
||||
for v in rx {
|
||||
test::black_box(v);
|
||||
let _ = test::black_box(v);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -268,7 +269,7 @@ mod legacy {
|
||||
|
||||
#[bench]
|
||||
fn bounded_tx_poll_ready(b: &mut Bencher) {
|
||||
let (mut tx, rx) = channel::<i32>(0);
|
||||
let (mut tx, _rx) = channel::<i32>(0);
|
||||
b.iter(|| {
|
||||
future::lazy(|| {
|
||||
assert!(tx.poll_ready().unwrap().is_ready());
|
||||
@@ -280,7 +281,7 @@ mod legacy {
|
||||
|
||||
#[bench]
|
||||
fn bounded_tx_poll_not_ready(b: &mut Bencher) {
|
||||
let (mut tx, rx) = channel::<i32>(0);
|
||||
let (mut tx, _rx) = channel::<i32>(0);
|
||||
tx.try_send(1).unwrap();
|
||||
b.iter(|| {
|
||||
future::lazy(|| {
|
||||
@@ -379,7 +380,7 @@ mod legacy {
|
||||
.take(4 * 1_000);
|
||||
|
||||
for v in rx {
|
||||
test::black_box(v);
|
||||
let _ = test::black_box(v);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -425,7 +426,7 @@ mod legacy {
|
||||
.take(THREADS * ITERS);
|
||||
|
||||
for v in rx {
|
||||
test::black_box(v);
|
||||
let _ = test::black_box(v);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#![feature(test)]
|
||||
#![cfg_attr(test, deny(warnings))]
|
||||
|
||||
extern crate tokio_sync;
|
||||
extern crate futures;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#![deny(warnings)]
|
||||
|
||||
extern crate futures;
|
||||
extern crate tokio_mock_task;
|
||||
extern crate tokio_sync;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
#![deny(warnings)]
|
||||
|
||||
extern crate futures;
|
||||
#[macro_use]
|
||||
extern crate loom;
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[path = "../src/task/atomic_task.rs"]
|
||||
mod atomic_task;
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#![deny(warnings)]
|
||||
|
||||
extern crate futures;
|
||||
#[macro_use]
|
||||
extern crate loom;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#![deny(warnings)]
|
||||
|
||||
extern crate futures;
|
||||
extern crate loom;
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#![deny(warnings)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate futures;
|
||||
#[macro_use]
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#![deny(warnings)]
|
||||
|
||||
extern crate futures;
|
||||
extern crate tokio_mock_task;
|
||||
extern crate tokio_sync;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#![deny(warnings)]
|
||||
|
||||
extern crate futures;
|
||||
extern crate tokio_mock_task;
|
||||
extern crate tokio_sync;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#![deny(warnings)]
|
||||
|
||||
extern crate futures;
|
||||
extern crate tokio_mock_task;
|
||||
extern crate tokio_sync;
|
||||
|
||||
Reference in New Issue
Block a user