Skip to content

Commit

Permalink
Gate methods as necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
jhpratt committed Jul 30, 2023
1 parent 8060100 commit 227b6f8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions time/src/duration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,7 @@ impl Duration {
}

/// Get the number of nanoseconds past the number of whole seconds.
#[cfg(feature = "quickcheck")]
pub(crate) const fn subsec_nanoseconds_ranged(self) -> Nanoseconds {
self.nanoseconds
}
Expand Down
1 change: 1 addition & 0 deletions time/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ impl Time {
}

/// Get the clock hour, minute, second, and nanosecond.
#[cfg(feature = "quickcheck")]
pub(crate) const fn as_hms_nano_ranged(self) -> (Hours, Minutes, Seconds, Nanoseconds) {
(self.hour, self.minute, self.second, self.nanosecond)
}
Expand Down
1 change: 1 addition & 0 deletions time/src/utc_offset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ impl UtcOffset {
/// assert_eq!(offset!(+1:02:03).as_hms(), (1, 2, 3));
/// assert_eq!(offset!(-1:02:03).as_hms(), (-1, -2, -3));
/// ```
#[cfg(feature = "quickcheck")]
pub(crate) const fn as_hms_ranged(self) -> (Hours, Minutes, Seconds) {
(self.hours, self.minutes, self.seconds)
}
Expand Down

0 comments on commit 227b6f8

Please sign in to comment.