Skip to content

Commit

Permalink
Fix copy-paste error in Duration::from_weeks panic message.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmillikin committed May 29, 2024
1 parent 1aaf0a9 commit c9c0713
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ impl Duration {
#[inline]
pub const fn from_weeks(weeks: u64) -> Duration {
if weeks > u64::MAX / (SECS_PER_MINUTE * MINS_PER_HOUR * HOURS_PER_DAY * DAYS_PER_WEEK) {
panic!("overflow in Duration::from_days");
panic!("overflow in Duration::from_weeks");
}

Duration::from_secs(weeks * MINS_PER_HOUR * SECS_PER_MINUTE * HOURS_PER_DAY * DAYS_PER_WEEK)
Expand Down

0 comments on commit c9c0713

Please sign in to comment.