Skip to content

Commit 9901812

Browse files
committed
Ignore clippy::infallible_destructuring_match lint
``` error: you seem to be trying to use `match` to destructure a single infallible pattern. Consider using `let` --> src/reaper/wait.rs:71:13 | 71 | / let inner = match &mut child.inner { 72 | | super::ChildGuard::Wait(inner) => inner, 73 | | #[cfg(not(windows))] 74 | | _ => unreachable!(), 75 | | }; | |______________^ help: try: `let super::ChildGuard::Wait(inner) = &mut child.inner;` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#infallible_destructuring_match = note: `-D clippy::infallible-destructuring-match` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::infallible_destructuring_match)]` ```
1 parent b06c90c commit 9901812

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/reaper/wait.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ impl Reaper {
6868
let mut child = child.lock().unwrap();
6969

7070
// Get the inner child value.
71+
#[allow(clippy::infallible_destructuring_match)] // false positive: should respect cfg
7172
let inner = match &mut child.inner {
7273
super::ChildGuard::Wait(inner) => inner,
7374
#[cfg(not(windows))]

0 commit comments

Comments
 (0)