From c9c0713ee9baea8ee529fb563c76fb801367916c Mon Sep 17 00:00:00 2001 From: John Millikin Date: Thu, 30 May 2024 08:40:48 +0900 Subject: [PATCH] Fix copy-paste error in `Duration::from_weeks` panic message. --- core/src/time.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/time.rs b/core/src/time.rs index 89202e7bb8dd5..dfa58e4f46d08 100644 --- a/core/src/time.rs +++ b/core/src/time.rs @@ -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)