mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-22 13:45:13 +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:
@@ -1,6 +1,7 @@
|
||||
use std::borrow::Cow;
|
||||
|
||||
use time::{Duration, Tm};
|
||||
use time::Tm;
|
||||
use chrono::Duration;
|
||||
|
||||
use super::{Cookie, SameSite};
|
||||
|
||||
@@ -16,7 +17,7 @@ use super::{Cookie, SameSite};
|
||||
///
|
||||
/// ```rust
|
||||
/// use actix_http::cookie::Cookie;
|
||||
/// use time::Duration;
|
||||
/// use chrono::Duration;
|
||||
///
|
||||
/// # fn main() {
|
||||
/// let cookie: Cookie = Cookie::build("name", "value")
|
||||
@@ -200,7 +201,7 @@ impl CookieBuilder {
|
||||
///
|
||||
/// ```rust
|
||||
/// use actix_http::cookie::Cookie;
|
||||
/// use time::Duration;
|
||||
/// use chrono::Duration;
|
||||
///
|
||||
/// # fn main() {
|
||||
/// let c = Cookie::build("foo", "bar")
|
||||
|
Reference in New Issue
Block a user