summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Leckey <leckey.ryan@gmail.com>2018-01-26 08:43:29 -0800
committerGitHub <noreply@github.com>2018-01-26 08:43:29 -0800
commit8734153d89dd8c69415ffabf4d673e454fe730f1 (patch)
tree0e49c4e6c9746e3bdb32370e627efb3086270d3a
parenteca93d3ed610dcf7f899120756335e3cf6cd353b (diff)
parent44e75a74bddf5c96d12dfdda18a4d3247a1a3bbf (diff)
Merge pull request #50 from snipsco/master
use nom's error_kind() to be robust againt nom feature selection accross a project
-rw-r--r--Cargo.toml2
-rw-r--r--src/path/parser.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/Cargo.toml b/Cargo.toml
index c3789ab..02f8968 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,7 +22,7 @@ hjson = ["serde-hjson"]
[dependencies]
lazy_static = "0.2"
serde = "^1.0.8"
-nom = "^3.0.0"
+nom = "^3.2.1"
toml = { version = "^0.4.1", optional = true }
serde_json = { version = "^1.0.2", optional = true }
diff --git a/src/path/parser.rs b/src/path/parser.rs
index d4b13dd..7629193 100644
--- a/src/path/parser.rs
+++ b/src/path/parser.rs
@@ -65,7 +65,7 @@ pub fn from_str(input: &str) -> Result<Expression, ErrorKind> {
// Forward Incomplete and Error
result => {
- return result.to_result();
+ return result.to_result().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(),
+ result => result.to_result().map_err(|e| e.into_error_kind()),
}
}