diff --git a/Cargo.toml b/Cargo.toml index f60be9c..51a0d5f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ homepage = "https://github.com/moia-oss/tinytime.rs" repository = "https://github.com/moia-oss/tinytime.rs" documentation = "https://docs.rs/tinytime" edition = "2021" -version = "0.8.0" +version = "0.9.0" license = "MIT OR Apache-2.0" [dependencies] diff --git a/src/lib.rs b/src/lib.rs index 848f62f..e515132 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -77,6 +77,7 @@ use thiserror::Error; Eq, PartialEq, Hash, Ord, PartialOrd, Copy, Clone, Default, Serialize, Deref, From, Into, )] pub struct Time(i64); + impl Time { pub const MAX: Self = Self(i64::MAX); pub const EPOCH: Self = Self(0); @@ -272,6 +273,7 @@ impl<'de> Deserialize<'de> for Time { } struct TimeVisitor; + impl<'de> Visitor<'de> for TimeVisitor { type Value = Time; @@ -318,6 +320,12 @@ impl From