diff --git a/Cargo.lock b/Cargo.lock index 5683333..93aa6e5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -303,7 +303,7 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lib" -version = "1.4.0" +version = "1.4.1" dependencies = [ "axum", "into-response-derive", diff --git a/Cargo.toml b/Cargo.toml index afd992a..adb2c2d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ homepage = "emberal.github.io" [package] name = "lib" -version = "1.4.0" +version = "1.4.1" description = "A library with utilities and helper fuctions." edition = { workspace = true } rust-version = { workspace = true } diff --git a/src/nom/combinators.rs b/src/nom/combinators.rs index 78dbd1d..a5c8dbf 100644 --- a/src/nom/combinators.rs +++ b/src/nom/combinators.rs @@ -31,8 +31,7 @@ pub fn parenthesized<'a, Parser, R>(inner: Parser) -> impl FnMut(&'a str) -> IRe where Parser: FnMut(&'a str) -> IResult<&'a str, R>, { - // TODO move trim out of here - delimited(char('('), trim(inner), char(')')) + delimited(char('('), inner, char(')')) } /// Take where the predicate is true and the length is exactly `n` @@ -57,9 +56,10 @@ where #[cfg(test)] mod tests { - use super::*; use nom::{bytes::complete::take_while, sequence::tuple}; + use super::*; + #[test] fn test_trim_both_sides() { let input = " test ";