diff --git a/Cargo.toml b/Cargo.toml index 371a74f81..90f5cced0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,6 @@ panic = 'unwind' [workspace.dependencies] wincode = "0.5.5" cactus = "1.0" -filetime = "0.2" fnv = "1.0" getopts = "0.2" glob = "0.3" diff --git a/cfgrammar/src/lib/header.rs b/cfgrammar/src/lib/header.rs index 634dc9a38..3d802d50a 100644 --- a/cfgrammar/src/lib/header.rs +++ b/cfgrammar/src/lib/header.rs @@ -153,6 +153,7 @@ macro_rules! try_into_numeric { ($typ:ty) => { impl TryInto<$typ> for &HeaderValue { type Error = HeaderError; + #[allow(unreachable_code)] fn try_into(self) -> Result<$typ, Self::Error> { macro_rules! fmt_err { ($found:literal,$span:ident) => { diff --git a/lrpar/Cargo.toml b/lrpar/Cargo.toml index c0f8ab57a..a5ff7e2f8 100644 --- a/lrpar/Cargo.toml +++ b/lrpar/Cargo.toml @@ -28,7 +28,6 @@ lrtable = { path="../lrtable", version = "0.15", features = ["wincode"] } wincode = { workspace = true, features = ["derive"] } cactus.workspace = true -filetime.workspace = true indexmap.workspace = true num-traits.workspace = true packedvec.workspace = true diff --git a/lrpar/src/lib/ctbuilder.rs b/lrpar/src/lib/ctbuilder.rs index 82b06555b..913e20692 100644 --- a/lrpar/src/lib/ctbuilder.rs +++ b/lrpar/src/lib/ctbuilder.rs @@ -29,7 +29,6 @@ use cfgrammar::{ header::{Header, HeaderError, HeaderErrorKind, Value}, yacc::{YaccGrammar, YaccKind, ast::ASTWithValidityInfo}, }; -use filetime::FileTime; use lrtable::{StateGraph, StateTable, statetable::Conflicts}; use num_traits::{AsPrimitive, PrimInt, Unsigned}; use wincode::{SchemaRead, SchemaReadOwned, SchemaWrite}; @@ -418,7 +417,7 @@ where #[cfg(test)] pub fn inspect_recoverer( mut self, - cb: Box Fn(RecoveryKind) -> Result<(), Box>>, + cb: Box Result<(), Box>>, ) -> Self { self.inspect_callback = Some(cb); self @@ -632,8 +631,7 @@ where // cases. if let Ok(ref inmd) = fs::metadata(grmp) && let Ok(ref out_rs_md) = fs::metadata(outp) - && FileTime::from_last_modification_time(out_rs_md) - > FileTime::from_last_modification_time(inmd) + && out_rs_md.modified()? > inmd.modified()? && let Ok(outc) = read_to_string(outp) { if outc.contains(&cache) {