This repository has been archived by the owner on Apr 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
nom v4 #15
Comments
diff --git a/Cargo.toml b/Cargo.toml
index f5cc72a..7210b7b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,7 @@ license = "MIT"
[dependencies]
petgraph = "^0.4"
-nom = "^2"
+nom = "^4"
lazy_static = "^0.2"
fnv = "^1"
parking_lot = "^0.4"
diff --git a/src/fdo_magic/mod.rs b/src/fdo_magic/mod.rs
index 3a1bee4..5325a5c 100644
--- a/src/fdo_magic/mod.rs
+++ b/src/fdo_magic/mod.rs
@@ -237,10 +237,10 @@ pub mod ruleset {
}
pub fn from_u8(b: &[u8]) -> Result<FnvHashMap<MIME, DiGraph<super::MagicRule, u32>>, String> {
- let tuplevec = from_u8_to_tuple_vec(b).to_result().map_err(|e| e.to_string())?;;
+ let tuplevec = from_u8_to_tuple_vec(b).map_err(|e| e.to_string())?;
let mut res = FnvHashMap::<MIME, DiGraph<super::MagicRule, u32>>::default();
- for x in tuplevec {
+ for x in tuplevec.1 {
res.insert(x.0, gen_graph(x.1));
}
This is something I tried, but that broke all tests with:
It thinks that all files are octet-stream now. |
@Geal, would you be able to help me with this, please? :) |
I published a (temporary?) stripped-down fork that includes PR #20 (upgrade to nom 5): |
tree_magic crate get warning at warning: the following packages contain code that will be rejected by a future version of Rust: nom v3.2.1
|
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
It would be very cool if you would update obsolete nom v2 to latest v4. I tried to do that update myself, but it turned out to be not trivial.
Thanks!
The text was updated successfully, but these errors were encountered: