summaryrefslogtreecommitdiffstats
path: root/vendor/humantime
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/humantime')
-rw-r--r--vendor/humantime/.cargo-checksum.json2
-rw-r--r--vendor/humantime/Cargo.toml2
-rw-r--r--vendor/humantime/src/date.rs7
-rw-r--r--vendor/humantime/src/duration.rs7
4 files changed, 16 insertions, 2 deletions
diff --git a/vendor/humantime/.cargo-checksum.json b/vendor/humantime/.cargo-checksum.json
index a5277e445..80dbdff4f 100644
--- a/vendor/humantime/.cargo-checksum.json
+++ b/vendor/humantime/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.toml":"74afb84b99fa5ba0f58b483df1ef0749821d4c2b5c5a9df299cb1cc0002c236f","LICENSE-APACHE":"c6596eb7be8581c18be736c846fb9173b69eccf6ef94c5135893ec56bd92ba08","LICENSE-MIT":"f6deca8261a8f4a3403dc74c725c46051157fd36c27cd4b100277eb1f303ad11","README.md":"e4bb65f28ddffb11d7eb337e9585947651f2fc11a5e4290f0ca126e21c582c1e","benches/datetime_format.rs":"ffe2e459e9b48e8fdbfb3686f6297257d66b29369ecd6750ae9fbba527ccc681","benches/datetime_parse.rs":"8039c4bd5f1795dbb54e1e39da5988f1d2df6c86c42d8fd378094fc78074d31e","bulk.yaml":"17c2548388e0cd3a63473021a2f1e4ddedee082d79d9167cb31ad06a1890d3fc","src/date.rs":"3f21e426f449e434e5973db9bd06a09d3f0cd6aa77708dbf0e3230bce7e48f44","src/duration.rs":"5a91e6e94c9ca2078ede527a4c159ddfc1cd67ade0d75a1c1db5474b40d2916f","src/lib.rs":"ad4dbed28080d9a64ef0100c96b20ff4988d9dde908f56e28ece7252f5932990","src/wrapper.rs":"badc640e77379a42b2fcb728337d60a764b7f00a1b5b1d50c7372ddc20941967","vagga.yaml":"8396fe1510117c1c7bc3e896b62290dcf2dd300346071297018b0077ad9e45ce"},"package":"3c1ad908cc71012b7bea4d0c53ba96a8cba9962f048fa68d143376143d863b7a"} \ No newline at end of file
+{"files":{"Cargo.toml":"c0d1443ae237dee3c09cb70185fa947d8d8cb660acfbcb8f650798bd4e0c019e","LICENSE-APACHE":"c6596eb7be8581c18be736c846fb9173b69eccf6ef94c5135893ec56bd92ba08","LICENSE-MIT":"f6deca8261a8f4a3403dc74c725c46051157fd36c27cd4b100277eb1f303ad11","README.md":"e4bb65f28ddffb11d7eb337e9585947651f2fc11a5e4290f0ca126e21c582c1e","benches/datetime_format.rs":"ffe2e459e9b48e8fdbfb3686f6297257d66b29369ecd6750ae9fbba527ccc681","benches/datetime_parse.rs":"8039c4bd5f1795dbb54e1e39da5988f1d2df6c86c42d8fd378094fc78074d31e","bulk.yaml":"17c2548388e0cd3a63473021a2f1e4ddedee082d79d9167cb31ad06a1890d3fc","src/date.rs":"a8159494372ba8ec8a3a0a5b69c9b185f3e7ab007f283188bf96a6f071151f20","src/duration.rs":"4939ae2d1c3056424de421c4b124d0fb387e058d9abc82a21b83b38d66a40753","src/lib.rs":"ad4dbed28080d9a64ef0100c96b20ff4988d9dde908f56e28ece7252f5932990","src/wrapper.rs":"badc640e77379a42b2fcb728337d60a764b7f00a1b5b1d50c7372ddc20941967","vagga.yaml":"8396fe1510117c1c7bc3e896b62290dcf2dd300346071297018b0077ad9e45ce"},"package":"9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"} \ No newline at end of file
diff --git a/vendor/humantime/Cargo.toml b/vendor/humantime/Cargo.toml
index 8d5838951..950db73d3 100644
--- a/vendor/humantime/Cargo.toml
+++ b/vendor/humantime/Cargo.toml
@@ -13,7 +13,7 @@
[package]
edition = "2018"
name = "humantime"
-version = "2.0.1"
+version = "2.1.0"
authors = ["Paul Colomiets <paul@colomiets.name>"]
description = " A parser and formatter for std::time::{Duration, SystemTime}\n"
homepage = "https://github.com/tailhook/humantime"
diff --git a/vendor/humantime/src/date.rs b/vendor/humantime/src/date.rs
index 0afe1f250..9d28ee7d0 100644
--- a/vendor/humantime/src/date.rs
+++ b/vendor/humantime/src/date.rs
@@ -240,6 +240,13 @@ pub fn format_rfc3339_nanos(system_time: SystemTime) -> Rfc3339Timestamp {
Rfc3339Timestamp(system_time, Precision::Nanos)
}
+impl Rfc3339Timestamp {
+ /// Returns a reference to the [`SystemTime`][] that is being formatted.
+ pub fn get_ref(&self) -> &SystemTime {
+ &self.0
+ }
+}
+
impl fmt::Display for Rfc3339Timestamp {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
use self::Precision::*;
diff --git a/vendor/humantime/src/duration.rs b/vendor/humantime/src/duration.rs
index 8359b851d..a4a46ebb3 100644
--- a/vendor/humantime/src/duration.rs
+++ b/vendor/humantime/src/duration.rs
@@ -285,6 +285,13 @@ fn item(f: &mut fmt::Formatter, started: &mut bool, name: &str, value: u32)
Ok(())
}
+impl FormattedDuration {
+ /// Returns a reference to the [`Duration`][] that is being formatted.
+ pub fn get_ref(&self) -> &Duration {
+ &self.0
+ }
+}
+
impl fmt::Display for FormattedDuration {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let secs = self.0.as_secs();