diff --git a/Cargo.toml b/Cargo.toml index 9f648269..9e56efec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,7 +56,7 @@ harness = false [dependencies] arc-swap = "1.6" -chrono = { version = "0.4.23", optional = true, features = ["clock"], default-features = false } +chrono = { version = "0.4.35", optional = true, features = ["clock"], default-features = false } flate2 = { version = "1.0", optional = true } fnv = "1.0" humantime = { version = "2.1", optional = true } diff --git a/src/append/rolling_file/policy/compound/trigger/time.rs b/src/append/rolling_file/policy/compound/trigger/time.rs index e058ee09..d574250e 100644 --- a/src/append/rolling_file/policy/compound/trigger/time.rs +++ b/src/append/rolling_file/policy/compound/trigger/time.rs @@ -386,6 +386,7 @@ mod test { use super::*; use mock_instant::MockClock; use std::time::Duration; + use std::error::Error as StdError; fn trigger_with_time_and_modulate( interval: TimeTriggerInterval, @@ -533,7 +534,9 @@ mod test { }; let trigger = TimeTrigger::new(interval, false, 0); - trigger.trigger(&logfile).unwrap_err(); + let error = trigger.trigger(&logfile).unwrap_err(); + let box_dyn = Box::::from(error); + assert_eq!(format!("too large interval in time trigger {:?}", interval), box_dyn.to_string()); } #[test]