|
| 1 | +error: redundant pattern matching, consider using `is_ok()` |
| 2 | + --> $DIR/redundant_pattern_matching_drop_order.rs:12:12 |
| 3 | + | |
| 4 | +LL | if let Ok(_) = m.lock() {} |
| 5 | + | -------^^^^^----------- help: try this: `if m.lock().is_ok()` |
| 6 | + | |
| 7 | + = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings` |
| 8 | + = note: this will change drop order of the result, as well as all temporaries |
| 9 | + = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important |
| 10 | + |
| 11 | +error: redundant pattern matching, consider using `is_err()` |
| 12 | + --> $DIR/redundant_pattern_matching_drop_order.rs:13:12 |
| 13 | + | |
| 14 | +LL | if let Err(_) = Err::<(), _>(m.lock().unwrap().0) {} |
| 15 | + | -------^^^^^^------------------------------------ help: try this: `if Err::<(), _>(m.lock().unwrap().0).is_err()` |
| 16 | + | |
| 17 | + = note: this will change drop order of the result, as well as all temporaries |
| 18 | + = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important |
| 19 | + |
| 20 | +error: redundant pattern matching, consider using `is_ok()` |
| 21 | + --> $DIR/redundant_pattern_matching_drop_order.rs:16:16 |
| 22 | + | |
| 23 | +LL | if let Ok(_) = Ok::<_, std::sync::MutexGuard<()>>(()) {} |
| 24 | + | -------^^^^^----------------------------------------- help: try this: `if Ok::<_, std::sync::MutexGuard<()>>(()).is_ok()` |
| 25 | + | |
| 26 | + = note: this will change drop order of the result, as well as all temporaries |
| 27 | + = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important |
| 28 | + |
| 29 | +error: redundant pattern matching, consider using `is_ok()` |
| 30 | + --> $DIR/redundant_pattern_matching_drop_order.rs:18:12 |
| 31 | + | |
| 32 | +LL | if let Ok(_) = Ok::<_, std::sync::MutexGuard<()>>(()) { |
| 33 | + | -------^^^^^----------------------------------------- help: try this: `if Ok::<_, std::sync::MutexGuard<()>>(()).is_ok()` |
| 34 | + | |
| 35 | + = note: this will change drop order of the result, as well as all temporaries |
| 36 | + = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important |
| 37 | + |
| 38 | +error: redundant pattern matching, consider using `is_ok()` |
| 39 | + --> $DIR/redundant_pattern_matching_drop_order.rs:21:12 |
| 40 | + | |
| 41 | +LL | if let Ok(_) = Ok::<_, std::sync::MutexGuard<()>>(()) {} |
| 42 | + | -------^^^^^----------------------------------------- help: try this: `if Ok::<_, std::sync::MutexGuard<()>>(()).is_ok()` |
| 43 | + |
| 44 | +error: redundant pattern matching, consider using `is_err()` |
| 45 | + --> $DIR/redundant_pattern_matching_drop_order.rs:22:12 |
| 46 | + | |
| 47 | +LL | if let Err(_) = Err::<std::sync::MutexGuard<()>, _>(()) {} |
| 48 | + | -------^^^^^^------------------------------------------ help: try this: `if Err::<std::sync::MutexGuard<()>, _>(()).is_err()` |
| 49 | + |
| 50 | +error: redundant pattern matching, consider using `is_ok()` |
| 51 | + --> $DIR/redundant_pattern_matching_drop_order.rs:24:12 |
| 52 | + | |
| 53 | +LL | if let Ok(_) = Ok::<_, ()>(String::new()) {} |
| 54 | + | -------^^^^^----------------------------- help: try this: `if Ok::<_, ()>(String::new()).is_ok()` |
| 55 | + |
| 56 | +error: redundant pattern matching, consider using `is_err()` |
| 57 | + --> $DIR/redundant_pattern_matching_drop_order.rs:25:12 |
| 58 | + | |
| 59 | +LL | if let Err(_) = Err::<(), _>((String::new(), ())) {} |
| 60 | + | -------^^^^^^------------------------------------ help: try this: `if Err::<(), _>((String::new(), ())).is_err()` |
| 61 | + |
| 62 | +error: redundant pattern matching, consider using `is_some()` |
| 63 | + --> $DIR/redundant_pattern_matching_drop_order.rs:28:12 |
| 64 | + | |
| 65 | +LL | if let Some(_) = Some(m.lock()) {} |
| 66 | + | -------^^^^^^^----------------- help: try this: `if Some(m.lock()).is_some()` |
| 67 | + | |
| 68 | + = note: this will change drop order of the result, as well as all temporaries |
| 69 | + = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important |
| 70 | + |
| 71 | +error: redundant pattern matching, consider using `is_some()` |
| 72 | + --> $DIR/redundant_pattern_matching_drop_order.rs:29:12 |
| 73 | + | |
| 74 | +LL | if let Some(_) = Some(m.lock().unwrap().0) {} |
| 75 | + | -------^^^^^^^---------------------------- help: try this: `if Some(m.lock().unwrap().0).is_some()` |
| 76 | + | |
| 77 | + = note: this will change drop order of the result, as well as all temporaries |
| 78 | + = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important |
| 79 | + |
| 80 | +error: redundant pattern matching, consider using `is_none()` |
| 81 | + --> $DIR/redundant_pattern_matching_drop_order.rs:32:16 |
| 82 | + | |
| 83 | +LL | if let None = None::<std::sync::MutexGuard<()>> {} |
| 84 | + | -------^^^^------------------------------------ help: try this: `if None::<std::sync::MutexGuard<()>>.is_none()` |
| 85 | + | |
| 86 | + = note: this will change drop order of the result, as well as all temporaries |
| 87 | + = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important |
| 88 | + |
| 89 | +error: redundant pattern matching, consider using `is_none()` |
| 90 | + --> $DIR/redundant_pattern_matching_drop_order.rs:34:12 |
| 91 | + | |
| 92 | +LL | if let None = None::<std::sync::MutexGuard<()>> { |
| 93 | + | -------^^^^------------------------------------ help: try this: `if None::<std::sync::MutexGuard<()>>.is_none()` |
| 94 | + | |
| 95 | + = note: this will change drop order of the result, as well as all temporaries |
| 96 | + = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important |
| 97 | + |
| 98 | +error: redundant pattern matching, consider using `is_none()` |
| 99 | + --> $DIR/redundant_pattern_matching_drop_order.rs:38:12 |
| 100 | + | |
| 101 | +LL | if let None = None::<std::sync::MutexGuard<()>> {} |
| 102 | + | -------^^^^------------------------------------ help: try this: `if None::<std::sync::MutexGuard<()>>.is_none()` |
| 103 | + |
| 104 | +error: redundant pattern matching, consider using `is_some()` |
| 105 | + --> $DIR/redundant_pattern_matching_drop_order.rs:40:12 |
| 106 | + | |
| 107 | +LL | if let Some(_) = Some(String::new()) {} |
| 108 | + | -------^^^^^^^---------------------- help: try this: `if Some(String::new()).is_some()` |
| 109 | + |
| 110 | +error: redundant pattern matching, consider using `is_some()` |
| 111 | + --> $DIR/redundant_pattern_matching_drop_order.rs:41:12 |
| 112 | + | |
| 113 | +LL | if let Some(_) = Some((String::new(), ())) {} |
| 114 | + | -------^^^^^^^---------------------------- help: try this: `if Some((String::new(), ())).is_some()` |
| 115 | + |
| 116 | +error: redundant pattern matching, consider using `is_ready()` |
| 117 | + --> $DIR/redundant_pattern_matching_drop_order.rs:44:12 |
| 118 | + | |
| 119 | +LL | if let Ready(_) = Ready(m.lock()) {} |
| 120 | + | -------^^^^^^^^------------------ help: try this: `if Ready(m.lock()).is_ready()` |
| 121 | + | |
| 122 | + = note: this will change drop order of the result, as well as all temporaries |
| 123 | + = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important |
| 124 | + |
| 125 | +error: redundant pattern matching, consider using `is_ready()` |
| 126 | + --> $DIR/redundant_pattern_matching_drop_order.rs:45:12 |
| 127 | + | |
| 128 | +LL | if let Ready(_) = Ready(m.lock().unwrap().0) {} |
| 129 | + | -------^^^^^^^^----------------------------- help: try this: `if Ready(m.lock().unwrap().0).is_ready()` |
| 130 | + | |
| 131 | + = note: this will change drop order of the result, as well as all temporaries |
| 132 | + = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important |
| 133 | + |
| 134 | +error: redundant pattern matching, consider using `is_pending()` |
| 135 | + --> $DIR/redundant_pattern_matching_drop_order.rs:48:16 |
| 136 | + | |
| 137 | +LL | if let Pending = Pending::<std::sync::MutexGuard<()>> {} |
| 138 | + | -------^^^^^^^--------------------------------------- help: try this: `if Pending::<std::sync::MutexGuard<()>>.is_pending()` |
| 139 | + | |
| 140 | + = note: this will change drop order of the result, as well as all temporaries |
| 141 | + = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important |
| 142 | + |
| 143 | +error: redundant pattern matching, consider using `is_pending()` |
| 144 | + --> $DIR/redundant_pattern_matching_drop_order.rs:50:12 |
| 145 | + | |
| 146 | +LL | if let Pending = Pending::<std::sync::MutexGuard<()>> { |
| 147 | + | -------^^^^^^^--------------------------------------- help: try this: `if Pending::<std::sync::MutexGuard<()>>.is_pending()` |
| 148 | + | |
| 149 | + = note: this will change drop order of the result, as well as all temporaries |
| 150 | + = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important |
| 151 | + |
| 152 | +error: redundant pattern matching, consider using `is_pending()` |
| 153 | + --> $DIR/redundant_pattern_matching_drop_order.rs:54:12 |
| 154 | + | |
| 155 | +LL | if let Pending = Pending::<std::sync::MutexGuard<()>> {} |
| 156 | + | -------^^^^^^^--------------------------------------- help: try this: `if Pending::<std::sync::MutexGuard<()>>.is_pending()` |
| 157 | + |
| 158 | +error: redundant pattern matching, consider using `is_ready()` |
| 159 | + --> $DIR/redundant_pattern_matching_drop_order.rs:56:12 |
| 160 | + | |
| 161 | +LL | if let Ready(_) = Ready(String::new()) {} |
| 162 | + | -------^^^^^^^^----------------------- help: try this: `if Ready(String::new()).is_ready()` |
| 163 | + |
| 164 | +error: redundant pattern matching, consider using `is_ready()` |
| 165 | + --> $DIR/redundant_pattern_matching_drop_order.rs:57:12 |
| 166 | + | |
| 167 | +LL | if let Ready(_) = Ready((String::new(), ())) {} |
| 168 | + | -------^^^^^^^^----------------------------- help: try this: `if Ready((String::new(), ())).is_ready()` |
| 169 | + |
| 170 | +error: aborting due to 22 previous errors |
| 171 | + |
0 commit comments