diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 34f70bcb..b77847ac 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -37,7 +37,7 @@ rio_api = "0.5" rio_turtle = "0.5" rio_xml = "0.5" hex = "0.4" -nom = "6" +nom = "5" peg = "0.6" siphasher = "0.3" lasso = {version="0.4", features=["multi-threaded", "inline-more"]} diff --git a/lib/src/model/xsd/parser.rs b/lib/src/model/xsd/parser.rs index c4710c02..2db2b6c8 100644 --- a/lib/src/model/xsd/parser.rs +++ b/lib/src/model/xsd/parser.rs @@ -146,7 +146,7 @@ const OVERFLOW_ERROR: XsdParseError = XsdParseError { }; pub fn parse_value<'a, T>( - mut f: impl FnMut(&'a str) -> XsdResult<'a, T>, + f: impl Fn(&'a str) -> XsdResult<'a, T>, input: &'a str, ) -> Result { let (left, result) = f(input)?; @@ -528,10 +528,10 @@ fn parsed_u8_range(input: &str, min: u8, max: u8) -> Result { } } -pub fn map_res<'a, O1, O2, E2: Into>( - mut first: impl FnMut(&'a str) -> XsdResult<'a, O1>, - mut second: impl FnMut(O1) -> Result, -) -> impl FnMut(&'a str) -> XsdResult<'a, O2> { +fn map_res<'a, O1, O2, E2: Into>( + first: impl Fn(&'a str) -> XsdResult<'a, O1>, + second: impl Fn(O1) -> Result, +) -> impl Fn(&'a str) -> XsdResult<'a, O2> { move |input| { let (input, o1) = first(input)?; Ok((input, second(o1).map_err(|e| Err::Error(e.into()))?))