1 #![deny(unnecessary_unwrap)]
13 let mut x: Result<(), ()> = Ok(());
33 fn test_complex_conditions() {
34 let x: Result<(), ()> = Ok(());
35 let y: Result<(), ()> = Ok(());
36 if x.is_ok() && y.is_err() {
40 // not clear whether unwrappable:
45 if x.is_ok() || y.is_ok() {
46 // not clear whether unwrappable:
53 let z: Result<(), ()> = Ok(());
54 if x.is_ok() && !(y.is_ok() || z.is_err()) {
59 if x.is_ok() || !(y.is_ok() && z.is_err()) {
60 // not clear what's unwrappable