diff options
| author | Botahamec <botahamec@outlook.com> | 2021-12-27 17:07:31 -0500 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2021-12-27 17:07:31 -0500 |
| commit | 561ec37ecfdb0cca9f3f0bfcab93e923bb9727be (patch) | |
| tree | 7759ab651203dc533a5f1668f48b836bacbbea00 /src/year.rs | |
| parent | ae55992cae51223690e5cead065425748529b753 (diff) | |
Removed serde
Diffstat (limited to 'src/year.rs')
| -rw-r--r-- | src/year.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/year.rs b/src/year.rs index 3b4fad9..22627dd 100644 --- a/src/year.rs +++ b/src/year.rs @@ -2,20 +2,16 @@ use core::ops::{Add, AddAssign, Sub, SubAssign}; use derive_more::{Display, FromStr}; -#[cfg(feature = "serde")] -use serde::{Deserialize, Serialize}; - /// A year value type, stored as an i32 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug, FromStr, Display)] -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub struct Year(i32); impl Year { /// The latest year that can be represented - pub const MAX: Year = Year(i32::MAX); + pub const MAX: Self = Self(i32::MAX); /// The earliest year that can be represented - pub const MIN: Year = Year(i32::MIN); + pub const MIN: Self = Self(i32::MIN); /// An equivalent of `Year::from(i32)`, which can be run at compile-time /// |
