File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ use std::time::{Duration, SystemTime};
9
9
///
10
10
/// # Specifications
11
11
///
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)
13
13
///
14
14
/// # Examples
15
15
///
@@ -29,7 +29,7 @@ use std::time::{Duration, SystemTime};
29
29
/// let expires = Expires::from_headers(res)?.unwrap();
30
30
///
31
31
/// // HTTP dates only have second-precision.
32
- /// let elapsed = time.duration_since(expires.at ())?;
32
+ /// let elapsed = time.duration_since(expires.expiration ())?;
33
33
/// assert_eq!(elapsed.as_secs(), 0);
34
34
/// #
35
35
/// # Ok(()) }
@@ -52,7 +52,7 @@ impl Expires {
52
52
}
53
53
54
54
/// Get the expiration time.
55
- pub fn at ( & self ) -> SystemTime {
55
+ pub fn expiration ( & self ) -> SystemTime {
56
56
self . instant
57
57
}
58
58
@@ -114,7 +114,7 @@ mod test {
114
114
let expires = Expires :: from_headers ( headers) ?. unwrap ( ) ;
115
115
116
116
// HTTP dates only have second-precision
117
- let elapsed = time. duration_since ( expires. at ( ) ) ?;
117
+ let elapsed = time. duration_since ( expires. expiration ( ) ) ?;
118
118
assert_eq ! ( elapsed. as_secs( ) , 0 ) ;
119
119
Ok ( ( ) )
120
120
}
You can’t perform that action at this time.
0 commit comments