diff options
author | Daniel Hofstetter <daniel.hofstetter@42dh.com> | 2024-03-10 13:55:49 +0100 |
---|---|---|
committer | Daniel Hofstetter <daniel.hofstetter@42dh.com> | 2024-03-10 13:55:49 +0100 |
commit | 9054a24fb70970edd2df05ca644c6e68049f1972 (patch) | |
tree | cd960054aaacab9fc8a1e62dd809c7071e6b5f54 | |
parent | 1eaa87cd628aa5b265c5077585e8d4110870ecc8 (diff) |
pr: fix deprecation warnings & remove comment
-rw-r--r-- | tests/by-util/test_pr.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/by-util/test_pr.rs b/tests/by-util/test_pr.rs index af3c41f1b..823f0718f 100644 --- a/tests/by-util/test_pr.rs +++ b/tests/by-util/test_pr.rs @@ -26,13 +26,12 @@ fn file_last_modified_time(ucmd: &UCommand, path: &str) -> String { } fn all_minutes(from: DateTime<Utc>, to: DateTime<Utc>) -> Vec<String> { - let to = to + Duration::minutes(1); - // const FORMAT: &str = "%b %d %H:%M %Y"; + let to = to + Duration::try_minutes(1).unwrap(); let mut vec = vec![]; let mut current = from; while current < to { vec.push(current.format(DATE_TIME_FORMAT).to_string()); - current += Duration::minutes(1); + current += Duration::try_minutes(1).unwrap(); } vec } |