Use the more readable version of `Duration::seconds(0)`, `Duration::zero()`

This commit is contained in:
kevinpoitra 2020-01-08 01:11:25 -06:00
parent c3b4f05149
commit a1366e2097
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ impl CookieSessionInner {
fn remove_cookie<B>(&self, res: &mut ServiceResponse<B>) -> Result<(), Error> {
let mut cookie = Cookie::named(self.name.clone());
cookie.set_value("");
cookie.set_max_age(Duration::seconds(0));
cookie.set_max_age(Duration::zero());
cookie.set_expires(OffsetDateTime::now() - Duration::days(365));
let val = HeaderValue::from_str(&cookie.to_string())?;