1 error: redundant pattern matching, consider using `is_ok()`
2 --> $DIR/redundant_pattern_matching_result.rs:16:12
4 LL | if let Ok(_) = &result {}
5 | -------^^^^^---------- help: try this: `if result.is_ok()`
7 = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
9 error: redundant pattern matching, consider using `is_ok()`
10 --> $DIR/redundant_pattern_matching_result.rs:18:12
12 LL | if let Ok(_) = Ok::<i32, i32>(42) {}
13 | -------^^^^^--------------------- help: try this: `if Ok::<i32, i32>(42).is_ok()`
15 error: redundant pattern matching, consider using `is_err()`
16 --> $DIR/redundant_pattern_matching_result.rs:20:12
18 LL | if let Err(_) = Err::<i32, i32>(42) {}
19 | -------^^^^^^---------------------- help: try this: `if Err::<i32, i32>(42).is_err()`
21 error: redundant pattern matching, consider using `is_ok()`
22 --> $DIR/redundant_pattern_matching_result.rs:22:15
24 LL | while let Ok(_) = Ok::<i32, i32>(10) {}
25 | ----------^^^^^--------------------- help: try this: `while Ok::<i32, i32>(10).is_ok()`
27 error: redundant pattern matching, consider using `is_err()`
28 --> $DIR/redundant_pattern_matching_result.rs:24:15
30 LL | while let Err(_) = Ok::<i32, i32>(10) {}
31 | ----------^^^^^^--------------------- help: try this: `while Ok::<i32, i32>(10).is_err()`
33 error: redundant pattern matching, consider using `is_ok()`
34 --> $DIR/redundant_pattern_matching_result.rs:34:5
36 LL | / match Ok::<i32, i32>(42) {
38 LL | | Err(_) => false,
40 | |_____^ help: try this: `Ok::<i32, i32>(42).is_ok()`
42 error: redundant pattern matching, consider using `is_err()`
43 --> $DIR/redundant_pattern_matching_result.rs:39:5
45 LL | / match Ok::<i32, i32>(42) {
46 LL | | Ok(_) => false,
47 LL | | Err(_) => true,
49 | |_____^ help: try this: `Ok::<i32, i32>(42).is_err()`
51 error: redundant pattern matching, consider using `is_err()`
52 --> $DIR/redundant_pattern_matching_result.rs:44:5
54 LL | / match Err::<i32, i32>(42) {
55 LL | | Ok(_) => false,
56 LL | | Err(_) => true,
58 | |_____^ help: try this: `Err::<i32, i32>(42).is_err()`
60 error: redundant pattern matching, consider using `is_ok()`
61 --> $DIR/redundant_pattern_matching_result.rs:49:5
63 LL | / match Err::<i32, i32>(42) {
65 LL | | Err(_) => false,
67 | |_____^ help: try this: `Err::<i32, i32>(42).is_ok()`
69 error: redundant pattern matching, consider using `is_ok()`
70 --> $DIR/redundant_pattern_matching_result.rs:54:20
72 LL | let _ = if let Ok(_) = Ok::<usize, ()>(4) { true } else { false };
73 | -------^^^^^--------------------- help: try this: `if Ok::<usize, ()>(4).is_ok()`
75 error: redundant pattern matching, consider using `is_ok()`
76 --> $DIR/redundant_pattern_matching_result.rs:60:20
78 LL | let _ = if let Ok(_) = gen_res() {
79 | -------^^^^^------------ help: try this: `if gen_res().is_ok()`
81 error: redundant pattern matching, consider using `is_err()`
82 --> $DIR/redundant_pattern_matching_result.rs:62:19
84 LL | } else if let Err(_) = gen_res() {
85 | -------^^^^^^------------ help: try this: `if gen_res().is_err()`
87 error: redundant pattern matching, consider using `is_some()`
88 --> $DIR/redundant_pattern_matching_result.rs:85:19
90 LL | while let Some(_) = r#try!(result_opt()) {}
91 | ----------^^^^^^^----------------------- help: try this: `while (r#try!(result_opt())).is_some()`
93 error: redundant pattern matching, consider using `is_some()`
94 --> $DIR/redundant_pattern_matching_result.rs:86:16
96 LL | if let Some(_) = r#try!(result_opt()) {}
97 | -------^^^^^^^----------------------- help: try this: `if (r#try!(result_opt())).is_some()`
99 error: redundant pattern matching, consider using `is_some()`
100 --> $DIR/redundant_pattern_matching_result.rs:92:12
102 LL | if let Some(_) = m!() {}
103 | -------^^^^^^^------- help: try this: `if m!().is_some()`
105 error: redundant pattern matching, consider using `is_some()`
106 --> $DIR/redundant_pattern_matching_result.rs:93:15
108 LL | while let Some(_) = m!() {}
109 | ----------^^^^^^^------- help: try this: `while m!().is_some()`
111 error: redundant pattern matching, consider using `is_ok()`
112 --> $DIR/redundant_pattern_matching_result.rs:111:12
114 LL | if let Ok(_) = Ok::<i32, i32>(42) {}
115 | -------^^^^^--------------------- help: try this: `if Ok::<i32, i32>(42).is_ok()`
117 error: redundant pattern matching, consider using `is_err()`
118 --> $DIR/redundant_pattern_matching_result.rs:113:12
120 LL | if let Err(_) = Err::<i32, i32>(42) {}
121 | -------^^^^^^---------------------- help: try this: `if Err::<i32, i32>(42).is_err()`
123 error: redundant pattern matching, consider using `is_ok()`
124 --> $DIR/redundant_pattern_matching_result.rs:115:15
126 LL | while let Ok(_) = Ok::<i32, i32>(10) {}
127 | ----------^^^^^--------------------- help: try this: `while Ok::<i32, i32>(10).is_ok()`
129 error: redundant pattern matching, consider using `is_err()`
130 --> $DIR/redundant_pattern_matching_result.rs:117:15
132 LL | while let Err(_) = Ok::<i32, i32>(10) {}
133 | ----------^^^^^^--------------------- help: try this: `while Ok::<i32, i32>(10).is_err()`
135 error: redundant pattern matching, consider using `is_ok()`
136 --> $DIR/redundant_pattern_matching_result.rs:119:5
138 LL | / match Ok::<i32, i32>(42) {
139 LL | | Ok(_) => true,
140 LL | | Err(_) => false,
142 | |_____^ help: try this: `Ok::<i32, i32>(42).is_ok()`
144 error: redundant pattern matching, consider using `is_err()`
145 --> $DIR/redundant_pattern_matching_result.rs:124:5
147 LL | / match Err::<i32, i32>(42) {
148 LL | | Ok(_) => false,
149 LL | | Err(_) => true,
151 | |_____^ help: try this: `Err::<i32, i32>(42).is_err()`
153 error: aborting due to 22 previous errors