File tree 3 files changed +14
-10
lines changed
3 files changed +14
-10
lines changed Original file line number Diff line number Diff line change 26
26
allow( dead_code, unused_assignments, unused_variables)
27
27
)
28
28
) ) ]
29
+ #![ allow( clippy:: if_then_panic) ]
29
30
30
31
#[ cfg( not( futures_no_atomic_cas) ) ]
31
32
#[ cfg( feature = "alloc" ) ]
Original file line number Diff line number Diff line change @@ -25,16 +25,19 @@ pub fn assert_is_unpin_stream<S: Stream + Unpin>(_: &mut S) {}
25
25
/// ```
26
26
#[ macro_export]
27
27
macro_rules! assert_stream_pending {
28
- ( $stream: expr) => { {
29
- let mut stream = & mut $stream;
30
- $crate:: __private:: assert:: assert_is_unpin_stream( stream) ;
31
- let stream = $crate:: __private:: Pin :: new( stream) ;
32
- let mut cx = $crate:: task:: noop_context( ) ;
33
- let poll = $crate:: __private:: stream:: Stream :: poll_next( stream, & mut cx) ;
34
- if poll. is_ready( ) {
35
- panic!( "assertion failed: stream is not pending" ) ;
28
+ ( $stream: expr) => {
29
+ #[ allow( clippy:: if_then_panic) ]
30
+ {
31
+ let mut stream = & mut $stream;
32
+ $crate:: __private:: assert:: assert_is_unpin_stream( stream) ;
33
+ let stream = $crate:: __private:: Pin :: new( stream) ;
34
+ let mut cx = $crate:: task:: noop_context( ) ;
35
+ let poll = $crate:: __private:: stream:: Stream :: poll_next( stream, & mut cx) ;
36
+ if poll. is_ready( ) {
37
+ panic!( "assertion failed: stream is not pending" ) ;
38
+ }
36
39
}
37
- } } ;
40
+ } ;
38
41
}
39
42
40
43
/// Assert that the next poll to the provided stream will return
Original file line number Diff line number Diff line change 14
14
allow( dead_code, unused_assignments, unused_variables)
15
15
)
16
16
) ) ]
17
-
17
+ #! [ allow ( clippy :: if_then_panic ) ]
18
18
#[ cfg( not( feature = "std" ) ) ]
19
19
compile_error ! (
20
20
"`futures-test` must have the `std` feature activated, this is a default-active feature"
You can’t perform that action at this time.
0 commit comments