Skip to content

Commit

Permalink
Merge pull request #1190 from cuviper/infallible
Browse files Browse the repository at this point in the history
Allow `unreachable_patterns` for `Infallible`
  • Loading branch information
cuviper authored Aug 18, 2024
2 parents 7b3ef64 + 01354af commit 83fe3bf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/iter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3536,6 +3536,7 @@ mod private {
fn from_residual(residual: Self::Residual) -> Self {
match residual {
Break(b) => Break(b),
#[allow(unreachable_patterns)]
Continue(_) => unreachable!(),
}
}
Expand All @@ -3561,6 +3562,7 @@ mod private {
fn from_residual(residual: Self::Residual) -> Self {
match residual {
None => None,
#[allow(unreachable_patterns)]
Some(_) => unreachable!(),
}
}
Expand All @@ -3586,6 +3588,7 @@ mod private {
fn from_residual(residual: Self::Residual) -> Self {
match residual {
Err(e) => Err(e),
#[allow(unreachable_patterns)]
Ok(_) => unreachable!(),
}
}
Expand All @@ -3611,6 +3614,7 @@ mod private {
fn from_residual(residual: Self::Residual) -> Self {
match residual {
Err(e) => Poll::Ready(Err(e)),
#[allow(unreachable_patterns)]
Ok(_) => unreachable!(),
}
}
Expand Down Expand Up @@ -3640,6 +3644,7 @@ mod private {
fn from_residual(residual: Self::Residual) -> Self {
match residual {
Err(e) => Poll::Ready(Some(Err(e))),
#[allow(unreachable_patterns)]
Ok(_) => unreachable!(),
}
}
Expand Down

0 comments on commit 83fe3bf

Please sign in to comment.