Skip to content

Commit 5ed9dfb

Browse files
committed
Rename Expires::at to Expires::expiration
1 parent d0bf1cb commit 5ed9dfb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/cache/expires.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::time::{Duration, SystemTime};
99
///
1010
/// # Specifications
1111
///
12-
/// - [RFC 7234 Hypertext Transfer Protocol (HTTP/1.1): Caching](https://tools.ietf.org/html/rfc7234#section-5.3)
12+
/// - [RFC 7234, section 5.3: Expires](https://tools.ietf.org/html/rfc7234#section-5.3)
1313
///
1414
/// # Examples
1515
///
@@ -29,7 +29,7 @@ use std::time::{Duration, SystemTime};
2929
/// let expires = Expires::from_headers(res)?.unwrap();
3030
///
3131
/// // HTTP dates only have second-precision.
32-
/// let elapsed = time.duration_since(expires.at())?;
32+
/// let elapsed = time.duration_since(expires.expiration())?;
3333
/// assert_eq!(elapsed.as_secs(), 0);
3434
/// #
3535
/// # Ok(()) }
@@ -52,7 +52,7 @@ impl Expires {
5252
}
5353

5454
/// Get the expiration time.
55-
pub fn at(&self) -> SystemTime {
55+
pub fn expiration(&self) -> SystemTime {
5656
self.instant
5757
}
5858

@@ -114,7 +114,7 @@ mod test {
114114
let expires = Expires::from_headers(headers)?.unwrap();
115115

116116
// HTTP dates only have second-precision
117-
let elapsed = time.duration_since(expires.at())?;
117+
let elapsed = time.duration_since(expires.expiration())?;
118118
assert_eq!(elapsed.as_secs(), 0);
119119
Ok(())
120120
}

0 commit comments

Comments
 (0)