Skip to content

Commit d23e049

Browse files
petar-dambovalievpitdicker
authored andcommitted
move MIN_UTC, MAX_UTC to a specialized impl
1 parent b64cedc commit d23e049

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/datetime/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -545,11 +545,6 @@ impl<Tz: TimeZone> DateTime<Tz> {
545545
.expect("writing rfc3339 datetime to string should never fail");
546546
result
547547
}
548-
549-
/// The minimum possible `DateTime<Utc>`.
550-
pub const MIN_UTC: DateTime<Utc> = DateTime { datetime: NaiveDateTime::MIN, offset: Utc };
551-
/// The maximum possible `DateTime<Utc>`.
552-
pub const MAX_UTC: DateTime<Utc> = DateTime { datetime: NaiveDateTime::MAX, offset: Utc };
553548
}
554549

555550
impl Default for DateTime<Utc> {
@@ -831,6 +826,11 @@ impl DateTime<Utc> {
831826
pub fn parse_from_str(s: &str, fmt: &str) -> ParseResult<DateTime<Utc>> {
832827
DateTime::<FixedOffset>::parse_from_str(s, fmt).map(|result| result.into())
833828
}
829+
830+
/// The minimum possible `DateTime<Utc>`.
831+
pub const MIN_UTC: Self = DateTime { datetime: NaiveDateTime::MIN, offset: Utc };
832+
/// The maximum possible `DateTime<Utc>`.
833+
pub const MAX_UTC: Self = DateTime { datetime: NaiveDateTime::MAX, offset: Utc };
834834
}
835835

836836
impl<Tz: TimeZone> DateTime<Tz>

0 commit comments

Comments
 (0)