mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-31 08:57:00 +02:00
replate time::Duration
with chrono::Duration
and add max_age_time
method (#789)
* feat: replate time::Duration with chrono::Duration * feat: rename max_age method which accepts `Duration` to max_age_time and add new max_age method accepting isize of seconds * feat: replace `time:Duration` with `chrono:Duration` in repo `actix-http`
This commit is contained in:
@@ -6,7 +6,7 @@ use std::fmt;
|
||||
use std::str::Utf8Error;
|
||||
|
||||
use percent_encoding::percent_decode;
|
||||
use time::{self, Duration};
|
||||
use chrono::Duration;
|
||||
|
||||
use super::{Cookie, CookieStr, SameSite};
|
||||
|
||||
@@ -220,7 +220,8 @@ where
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::{Cookie, SameSite};
|
||||
use time::{strptime, Duration};
|
||||
use time::strptime;
|
||||
use chrono::Duration;
|
||||
|
||||
macro_rules! assert_eq_parse {
|
||||
($string:expr, $expected:expr) => {
|
||||
|
Reference in New Issue
Block a user