From 1705dd56b2ffa9da5c9a5416c051da67844808e3 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Sat, 8 Aug 2020 15:11:39 +0200 Subject: [PATCH] Rename Expires::at to Expires::expiration --- src/cache/expires.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cache/expires.rs b/src/cache/expires.rs index 04167bae..3cef9071 100644 --- a/src/cache/expires.rs +++ b/src/cache/expires.rs @@ -29,7 +29,7 @@ use std::time::{Duration, SystemTime}; /// let expires = Expires::from_headers(res)?.unwrap(); /// /// // HTTP dates only have second-precision. -/// let elapsed = time.duration_since(expires.at())?; +/// let elapsed = time.duration_since(expires.expiration())?; /// assert_eq!(elapsed.as_secs(), 0); /// # /// # Ok(()) } @@ -52,7 +52,7 @@ impl Expires { } /// Get the expiration time. - pub fn at(&self) -> SystemTime { + pub fn expiration(&self) -> SystemTime { self.instant } @@ -114,7 +114,7 @@ mod test { let expires = Expires::from_headers(headers)?.unwrap(); // HTTP dates only have second-precision - let elapsed = time.duration_since(expires.at())?; + let elapsed = time.duration_since(expires.expiration())?; assert_eq!(elapsed.as_secs(), 0); Ok(()) }