Skip to content

Commit 5163aaa

Browse files
committed
really fix clippy
1 parent 8a603f5 commit 5163aaa

File tree

4 files changed

+13
-23
lines changed

4 files changed

+13
-23
lines changed

tests/integration_tests/coop_cancel.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22

33
use std::convert::Infallible;
44
use tokio::sync::oneshot;
5-
#[cfg(not(tokio_wasm_not_wasi))]
6-
use tokio::test as maybe_tokio_test;
75
use tokio_test::{assert_pending, assert_ready, task};
8-
#[cfg(tokio_wasm_not_wasi)]
9-
use wasm_bindgen_test::wasm_bindgen_test as maybe_tokio_test;
106

11-
#[maybe_tokio_test]
7+
#[tokio::test]
128
async fn basic_cancel() {
139
// Test basic cancellation.
1410
{
@@ -47,7 +43,7 @@ async fn basic_cancel() {
4743
}
4844
}
4945

50-
#[maybe_tokio_test]
46+
#[tokio::test]
5147
async fn multiple_messages() {
5248
// Test multiple messages.
5349
{

tests/integration_tests/join_all_then_try.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@ use cancel_safe_futures::future::join_all_then_try;
44
use futures_util::future::{err, ok};
55
use std::future::Future;
66
use tokio::sync::oneshot;
7-
#[cfg(not(tokio_wasm_not_wasi))]
8-
use tokio::test as maybe_tokio_test;
97
use tokio_test::{assert_pending, assert_ready, task};
10-
#[cfg(tokio_wasm_not_wasi)]
11-
use wasm_bindgen_test::wasm_bindgen_test as maybe_tokio_test;
128

13-
#[maybe_tokio_test]
9+
#[tokio::test]
1410
async fn basic() {
1511
assert_eq!(
1612
join_all_then_try(vec![ok(1), ok(2)]).await,
@@ -19,7 +15,7 @@ async fn basic() {
1915
assert_eq!(join_all_then_try(vec![ok(1), err(2)]).await, Err(2));
2016
}
2117

22-
#[maybe_tokio_test]
18+
#[tokio::test]
2319
async fn iter_lifetime() {
2420
// In futures-rs version 0.1, this function would fail to typecheck due to an overly
2521
// conservative type parameterization of `TryJoinAll`.
@@ -34,7 +30,7 @@ async fn iter_lifetime() {
3430
);
3531
}
3632

37-
#[maybe_tokio_test]
33+
#[tokio::test]
3834
async fn err_no_abort_early() {
3935
// Run this test for several sizes of vectors, since the implementation is different depending
4036
// on the length of the input vector (the implementation changes at 30 elements).

tests/integration_tests/macros_join_then_try.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,37 @@
33

44
use std::sync::Arc;
55
use tokio::sync::{oneshot, Semaphore};
6-
#[cfg(not(tokio_wasm_not_wasi))]
7-
use tokio::test as maybe_tokio_test;
86
use tokio_test::{assert_pending, assert_ready, task};
9-
#[cfg(tokio_wasm_not_wasi)]
10-
use wasm_bindgen_test::wasm_bindgen_test as maybe_tokio_test;
117

12-
#[maybe_tokio_test]
8+
#[tokio::test]
139
async fn sync_one_lit_expr_comma() {
1410
let foo = cancel_safe_futures::join_then_try!(async { ok(1) },);
1511

1612
assert_eq!(foo, Ok((1,)));
1713
}
1814

19-
#[maybe_tokio_test]
15+
#[tokio::test]
2016
async fn sync_one_lit_expr_no_comma() {
2117
let foo = cancel_safe_futures::join_then_try!(async { ok(1) });
2218

2319
assert_eq!(foo, Ok((1,)));
2420
}
2521

26-
#[maybe_tokio_test]
22+
#[tokio::test]
2723
async fn sync_two_lit_expr_comma() {
2824
let foo = cancel_safe_futures::join_then_try!(async { ok(1) }, async { ok(2) },);
2925

3026
assert_eq!(foo, Ok((1, 2)));
3127
}
3228

33-
#[maybe_tokio_test]
29+
#[tokio::test]
3430
async fn sync_two_lit_expr_no_comma() {
3531
let foo = cancel_safe_futures::join_then_try!(async { ok(1) }, async { ok(2) });
3632

3733
assert_eq!(foo, Ok((1, 2)));
3834
}
3935

40-
#[maybe_tokio_test]
36+
#[tokio::test]
4137
async fn two_await() {
4238
let (tx1, rx1) = oneshot::channel::<&str>();
4339
let (tx2, rx2) = oneshot::channel::<u32>();
@@ -57,7 +53,7 @@ async fn two_await() {
5753
assert_eq!(Ok(("hello", 123)), res);
5854
}
5955

60-
#[maybe_tokio_test]
56+
#[tokio::test]
6157
async fn err_no_abort_early() {
6258
let (tx1, rx1) = oneshot::channel::<&str>();
6359
let (tx2, rx2) = oneshot::channel::<u32>();

tests/integration_tests/sync_mutex.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ async fn aborted_future_2() {
110110
#[tokio::test]
111111
async fn cancelled_perform_async() {
112112
#[derive(Debug)]
113+
#[allow(dead_code)]
113114
struct Foo(u32);
114115

115116
let m1: Arc<RobustMutex<Foo>> = Arc::new(RobustMutex::new(Foo(0)));
@@ -131,6 +132,7 @@ async fn cancelled_perform_async() {
131132
#[tokio::test]
132133
async fn cancelled_perform_async_local() {
133134
#[derive(Debug)]
135+
#[allow(dead_code)]
134136
struct Foo(u32);
135137

136138
let m1: Arc<RobustMutex<Foo>> = Arc::new(RobustMutex::new(Foo(0)));

0 commit comments

Comments
 (0)