diff options
author | Ryan Leckey <leckey.ryan@gmail.com> | 2018-07-02 15:08:10 -0700 |
---|---|---|
committer | Ryan Leckey <leckey.ryan@gmail.com> | 2018-07-02 15:08:10 -0700 |
commit | fc1a965519dbb687c28a3cdf903f43b4e1e1d213 (patch) | |
tree | 23db33cf128a6e07a2630b2969c2e336d3261f44 /src/path | |
parent | b8a1d8a65defb08c501df83b464a55f270765876 (diff) | |
parent | e3f25ce0d911aa4a2bc3c4ca32d6ed29c98a4a3d (diff) |
Merge branch 'master' of https://github.com/Geal/config-rs
Diffstat (limited to 'src/path')
-rw-r--r-- | src/path/parser.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/path/parser.rs b/src/path/parser.rs index 3ec433e..b998ee1 100644 --- a/src/path/parser.rs +++ b/src/path/parser.rs @@ -55,17 +55,17 @@ fn postfix(expr: Expression) -> Box<Fn(&[u8]) -> IResult<&[u8], Expression>> { pub fn from_str(input: &str) -> Result<Expression, ErrorKind> { match ident(input.as_bytes()) { - IResult::Done(mut rem, mut expr) => { + Ok((mut rem, mut expr)) => { while !rem.is_empty() { match postfix(expr)(rem) { - IResult::Done(rem_, expr_) => { + Ok((rem_, expr_)) => { rem = rem_; expr = expr_; } // Forward Incomplete and Error result => { - return result.to_result().map_err(|e| e.into_error_kind()); + return result.map(|(_,o)| o).map_err(|e| e.into_error_kind()); } } } @@ -74,7 +74,7 @@ pub fn from_str(input: &str) -> Result<Expression, ErrorKind> { } // Forward Incomplete and Error - result => result.to_result().map_err(|e| e.into_error_kind()), + result => result.map(|(_,o)| o).map_err(|e| e.into_error_kind()), } } |