From 5002bdbab5525aa0f9d09ee672a6b54a5439d167 Mon Sep 17 00:00:00 2001 From: Fenhl Date: Tue, 17 May 2022 07:00:52 +0000 Subject: [PATCH] Update for 2nd release candidate --- Cargo.toml | 3 +-- src/lib.rs | 2 +- tests/fairing_configured.rs | 2 +- tests/guard_configured.rs | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6e34966..4b6dbd5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,5 +16,4 @@ publish = true base64 = { version = "0.13.0" } bcrypt = { version = "0.9" } rand = { version = "0.8.3" } -rocket = { version = "0.5.0-rc.1", features = ["secrets"] } -time = { version = "0.2.25" } +rocket = { version = "0.5.0-rc.2", features = ["secrets"] } diff --git a/src/lib.rs b/src/lib.rs index 8e20df8..8d47687 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,10 +5,10 @@ use rocket::{ fairing::{self, Fairing as RocketFairing, Info, Kind}, http::{Cookie, Status}, request::{FromRequest, Outcome}, + time::{Duration, OffsetDateTime}, Data, Request, Rocket, State, }; use std::borrow::Cow; -use time::{Duration, OffsetDateTime}; const BCRYPT_COST: u32 = 8; diff --git a/tests/fairing_configured.rs b/tests/fairing_configured.rs index b287ea7..02dfae6 100644 --- a/tests/fairing_configured.rs +++ b/tests/fairing_configured.rs @@ -14,7 +14,7 @@ fn rocket() -> rocket::Rocket { rocket_csrf::CsrfConfig::default() .with_cookie_name(COOKIE_NAME) .with_cookie_len(COOKIE_LEN) - .with_lifetime(time::Duration::days(3)), + .with_lifetime(rocket::time::Duration::days(3)), )) .mount("/", routes![index]) } diff --git a/tests/guard_configured.rs b/tests/guard_configured.rs index 295e8d0..9335d15 100644 --- a/tests/guard_configured.rs +++ b/tests/guard_configured.rs @@ -19,7 +19,7 @@ fn rocket() -> rocket::Rocket { rocket_csrf::CsrfConfig::default() .with_cookie_name(COOKIE_NAME) .with_cookie_len(COOKIE_LEN) - .with_lifetime(time::Duration::days(3)), + .with_lifetime(rocket::time::Duration::days(3)), )) .mount("/", routes![index]) }