From a8234d5f8729fd78a76641bc341519941bfb14aa 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. --- library/core/src/time.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/time.rs b/library/core/src/time.rs index 89202e7bb8dd5..dfa58e4f46d08 100644 --- a/library/core/src/time.rs +++ b/library/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)