4 #![warn(clippy::redundant_pattern_matching)]
5 #![allow(clippy::if_same_then_else, clippy::equatable_if_let)]
6 use std::task::Poll::{Pending, Ready};
9 let m = std::sync::Mutex::new((0, 0));
12 if m.lock().is_ok() {}
13 if Err::<(), _>(m.lock().unwrap().0).is_err() {}
16 if Ok::<_, std::sync::MutexGuard<()>>(()).is_ok() {}
18 if Ok::<_, std::sync::MutexGuard<()>>(()).is_ok() {
21 if Ok::<_, std::sync::MutexGuard<()>>(()).is_ok() {}
22 if Err::<std::sync::MutexGuard<()>, _>(()).is_err() {}
24 if Ok::<_, ()>(String::new()).is_ok() {}
25 if Err::<(), _>((String::new(), ())).is_err() {}
28 if Some(m.lock()).is_some() {}
29 if Some(m.lock().unwrap().0).is_some() {}
32 if None::<std::sync::MutexGuard<()>>.is_none() {}
34 if None::<std::sync::MutexGuard<()>>.is_none() {
38 if None::<std::sync::MutexGuard<()>>.is_none() {}
40 if Some(String::new()).is_some() {}
41 if Some((String::new(), ())).is_some() {}
44 if Ready(m.lock()).is_ready() {}
45 if Ready(m.lock().unwrap().0).is_ready() {}
48 if Pending::<std::sync::MutexGuard<()>>.is_pending() {}
50 if Pending::<std::sync::MutexGuard<()>>.is_pending() {
54 if Pending::<std::sync::MutexGuard<()>>.is_pending() {}
56 if Ready(String::new()).is_ready() {}
57 if Ready((String::new(), ())).is_ready() {}