Skip to content

Commit

Permalink
Update to chrono 0.4.35
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisschagt committed Mar 9, 2024
1 parent 8784c2e commit d94c76b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions rust/libnewsboat/src/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ macro_rules! log {
mod tests {
use super::*;

use chrono::{Duration, NaiveDateTime};
use chrono::{NaiveDateTime, TimeDelta};
use std::io::{self, BufRead, BufReader};
use std::path;
use tempfile::TempDir;
Expand Down Expand Up @@ -499,7 +499,7 @@ mod tests {
// `start_time` and `end_time` may have millisecond precision or better,
// whereas `timestamp` is limited to seconds. Therefore, we account for
// a situation where `start_time` is slightly bigger than `timestamp`.
assert!(timestamp - start_time > Duration::seconds(-1));
assert!(timestamp - start_time > TimeDelta::try_seconds(-1).unwrap());
assert!(finish_time >= timestamp);

assert_eq!(message, expected);
Expand Down Expand Up @@ -830,7 +830,7 @@ mod tests {
// `start_time` and `end_time` may have millisecond precision or better,
// whereas `timestamp` is limited to seconds. Therefore, we account for
// a situation where `start_time` is slightly bigger than `timestamp`.
assert!(timestamp - start_time > Duration::seconds(-1));
assert!(timestamp - start_time > TimeDelta::try_seconds(-1).unwrap());
assert!(finish_time >= timestamp);

assert_eq!(message, expected);
Expand Down

0 comments on commit d94c76b

Please sign in to comment.