Rollup merge of #125746 - jmillikin:duration-from-weeks-typo, r=lqd · model-checking/verify-rust-std@bbaaa79 (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit bbaaa79
Rollup merge of rust-lang#125746 - jmillikin:duration-from-weeks-typo, r=lqd
Fix copy-paste error in `Duration::from_weeks` panic message.
File tree
1 file changed
lines changed
1 file changed
lines changed
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -348,7 +348,7 @@ impl Duration { | ||
348 | 348 | #[inline] |
349 | 349 | pub const fn from_weeks(weeks: u64) -> Duration { |
350 | 350 | if weeks > u64::MAX / (SECS_PER_MINUTE * MINS_PER_HOUR * HOURS_PER_DAY * DAYS_PER_WEEK) { |
351 | -panic!("overflow in Duration::from_days"); | |
351 | +panic!("overflow in Duration::from_weeks"); | |
352 | 352 | } |
353 | 353 | |
354 | 354 | Duration::from_secs(weeks * MINS_PER_HOUR * SECS_PER_MINUTE * HOURS_PER_DAY * DAYS_PER_WEEK) |