Skip to content

Commit

Permalink
Hide long-deprecated items
Browse files Browse the repository at this point in the history
  • Loading branch information
jhpratt committed Apr 12, 2023
1 parent 79ca269 commit fadac54
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions time/src/date_time.rs
Expand Up @@ -826,6 +826,7 @@ impl<O: MaybeOffset> DateTime<O> {
// `OffsetDateTime` is made an alias of `DateTime<Fixed>`. Consider hiding these methods from
// documentation in the future.

#[doc(hidden)]
#[allow(dead_code)] // while functionally private
#[deprecated(since = "0.3.18", note = "use `as_hms` instead")]
pub const fn to_hms(self) -> (u8, u8, u8)
Expand All @@ -835,6 +836,7 @@ impl<O: MaybeOffset> DateTime<O> {
self.time.as_hms()
}

#[doc(hidden)]
#[allow(dead_code)] // while functionally private
#[deprecated(since = "0.3.18", note = "use `as_hms_milli` instead")]
pub const fn to_hms_milli(self) -> (u8, u8, u8, u16)
Expand All @@ -844,6 +846,7 @@ impl<O: MaybeOffset> DateTime<O> {
self.time.as_hms_milli()
}

#[doc(hidden)]
#[allow(dead_code)] // while functionally private
#[deprecated(since = "0.3.18", note = "use `as_hms_micro` instead")]
pub const fn to_hms_micro(self) -> (u8, u8, u8, u32)
Expand All @@ -853,6 +856,7 @@ impl<O: MaybeOffset> DateTime<O> {
self.time.as_hms_micro()
}

#[doc(hidden)]
#[allow(dead_code)] // while functionally private
#[deprecated(since = "0.3.18", note = "use `as_hms_nano` instead")]
pub const fn to_hms_nano(self) -> (u8, u8, u8, u32)
Expand Down
6 changes: 6 additions & 0 deletions time/src/parsing/parsed.rs
Expand Up @@ -423,6 +423,7 @@ impl Parsed {
}

/// Obtain the absolute value of the offset minute.
#[doc(hidden)]
#[deprecated(since = "0.3.8", note = "use `parsed.offset_minute_signed()` instead")]
pub const fn offset_minute(&self) -> Option<u8> {
Some(const_try_opt!(self.offset_minute_signed()).unsigned_abs())
Expand All @@ -447,6 +448,7 @@ impl Parsed {
}

/// Obtain the absolute value of the offset second.
#[doc(hidden)]
#[deprecated(since = "0.3.8", note = "use `parsed.offset_second_signed()` instead")]
pub const fn offset_second(&self) -> Option<u8> {
Some(const_try_opt!(self.offset_second_signed()).unsigned_abs())
Expand Down Expand Up @@ -523,6 +525,7 @@ impl Parsed {
}

/// Set the named component.
#[doc(hidden)]
#[deprecated(
since = "0.3.8",
note = "use `parsed.set_offset_minute_signed()` instead"
Expand All @@ -543,6 +546,7 @@ impl Parsed {
}

/// Set the named component.
#[doc(hidden)]
#[deprecated(
since = "0.3.8",
note = "use `parsed.set_offset_second_signed()` instead"
Expand Down Expand Up @@ -615,6 +619,7 @@ impl Parsed {
}

/// Set the named component and return `self`.
#[doc(hidden)]
#[deprecated(
since = "0.3.8",
note = "use `parsed.with_offset_minute_signed()` instead"
Expand All @@ -635,6 +640,7 @@ impl Parsed {
}

/// Set the named component and return `self`.
#[doc(hidden)]
#[deprecated(
since = "0.3.8",
note = "use `parsed.with_offset_second_signed()` instead"
Expand Down

0 comments on commit fadac54

Please sign in to comment.