summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Poumeyrol <kali@zoy.org>2017-09-20 12:42:39 +0200
committerMathieu Poumeyrol <kali@zoy.org>2017-09-20 12:42:39 +0200
commitba55af8109ad38f3501670a70715841f5969cfae (patch)
tree4fca1ce9129f73a6bb3b6a86599b62108607cdcf
parentf70a2d406387fb338f842ba22924d3076da97e22 (diff)
fix weird nom errorkind issue
-rw-r--r--Cargo.toml3
-rw-r--r--src/path/parser.rs4
2 files changed, 4 insertions, 3 deletions
diff --git a/Cargo.toml b/Cargo.toml
index c3789ab..44da107 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,7 +22,8 @@ hjson = ["serde-hjson"]
[dependencies]
lazy_static = "0.2"
serde = "^1.0.8"
-nom = "^3.0.0"
+# nom = "^3.0.0"
+nom = { git = "github.com:snipsco/nom", rev = "3769283" }
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()),
}
}