fix clippy lints from 1.80-1.81 (#2488)

* fix some clippy lints

* fix clippy::doc_lazy_continuation

* fix some lints for 1.82
This commit is contained in:
trinity-1686a
2024-09-05 14:33:05 +02:00
committed by GitHub
parent a206c3ccd3
commit 85395d942a
30 changed files with 79 additions and 98 deletions

View File

@@ -109,6 +109,9 @@ where F: nom::Parser<I, (O, ErrorList), Infallible> {
move |input: I| match f.parse(input) {
Ok((input, (output, _err))) => Ok((input, output)),
Err(Err::Incomplete(needed)) => Err(Err::Incomplete(needed)),
// old versions don't understand this is uninhabited and need the empty match to help,
// newer versions warn because this arm is unreachable (which it is indeed).
#[allow(unreachable_patterns)]
Err(Err::Error(val)) | Err(Err::Failure(val)) => match val {},
}
}