1
0
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:
Kilerd Chan
2019-04-20 04:54:44 +08:00
committed by Nikolay Kim
parent 1e7f97a111
commit 791f22bbc8
7 changed files with 82 additions and 19 deletions

View File

@@ -1,7 +1,7 @@
use std::collections::HashSet;
use std::mem::replace;
use time::{self, Duration};
use chrono::Duration;
use super::delta::DeltaCookie;
use super::Cookie;
@@ -188,7 +188,7 @@ impl CookieJar {
///
/// ```rust
/// use actix_http::cookie::{CookieJar, Cookie};
/// use time::Duration;
/// use chrono::Duration;
///
/// # fn main() {
/// let mut jar = CookieJar::new();
@@ -241,7 +241,7 @@ impl CookieJar {
///
/// ```rust
/// use actix_http::cookie::{CookieJar, Cookie};
/// use time::Duration;
/// use chrono::Duration;
///
/// # fn main() {
/// let mut jar = CookieJar::new();
@@ -538,7 +538,7 @@ mod test {
#[cfg(feature = "secure-cookies")]
fn delta() {
use std::collections::HashMap;
use time::Duration;
use chrono::Duration;
let mut c = CookieJar::new();