aboutsummaryrefslogtreecommitdiff
path: root/src/raw/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/raw/parser.rs')
-rw-r--r--src/raw/parser.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/raw/parser.rs b/src/raw/parser.rs
index a9d8e8a..b7d6aad 100644
--- a/src/raw/parser.rs
+++ b/src/raw/parser.rs
@@ -412,7 +412,12 @@ pub fn parse_partial_file<R: Read>(mut input: R) -> ParseResult<PartialEvtc> {
///
/// * `partial` - The partial EVTC.
/// * `input` - The input stream.
+#[allow(clippy::redundant_closure)]
pub fn finish_parsing<R: Read>(partial: PartialEvtc, input: R) -> ParseResult<Evtc> {
+ // The following closures seem redundant, but they are needed to convice Rust that we can
+ // actually use parse_event_rev* here. That is because we require a lifetime bound of
+ // for<'r> fn(&'r mut R) -> ParseResult
+ // which we cannot get by just plugging in parse_event_rev*.
let events = match partial.header.revision {
0 => parse_events(input, |r| parse_event_rev0(r))?,
1 => parse_events(input, |r| parse_event_rev1(r))?,