mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-31 05:26:23 +03:00
4eac58a0b0
Fix rust-lang/rust-clippy#15943 ```rust pub fn from_days(days: u8) -> Duration { Duration::from_secs(86400 * u64::from(days)) } ``` An initial foundation that can be used for future improvements. It is been a while since I touched Clippy so feel free to indicate better designs if applicable. Looks like https://github.com/rust-lang/rust-clippy/pull/15342 will help but it is unclear when it will be finished. This PR provides a partial solution for the current time. changelog: [`arithmetic_side_effects`]: Consider type conversion that won't overflow