mirror of https://github.com/fafhrd91/actix-web
Use the more readable version of `Duration::seconds(0)`, `Duration::zero()`
This commit is contained in:
parent
c3b4f05149
commit
a1366e2097
|
@ -124,7 +124,7 @@ impl CookieSessionInner {
|
||||||
fn remove_cookie<B>(&self, res: &mut ServiceResponse<B>) -> Result<(), Error> {
|
fn remove_cookie<B>(&self, res: &mut ServiceResponse<B>) -> Result<(), Error> {
|
||||||
let mut cookie = Cookie::named(self.name.clone());
|
let mut cookie = Cookie::named(self.name.clone());
|
||||||
cookie.set_value("");
|
cookie.set_value("");
|
||||||
cookie.set_max_age(Duration::seconds(0));
|
cookie.set_max_age(Duration::zero());
|
||||||
cookie.set_expires(OffsetDateTime::now() - Duration::days(365));
|
cookie.set_expires(OffsetDateTime::now() - Duration::days(365));
|
||||||
|
|
||||||
let val = HeaderValue::from_str(&cookie.to_string())?;
|
let val = HeaderValue::from_str(&cookie.to_string())?;
|
||||||
|
|
Loading…
Reference in New Issue