rust/clippy_lints
Samuel Tardieu 4eac58a0b0
Consider type conversion that won't overflow (#15950)
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
2025-11-05 08:07:35 +00:00
..
src Consider type conversion that won't overflow (#15950) 2025-11-05 08:07:35 +00:00
Cargo.toml Bump Clippy version -> 0.1.93 2025-10-31 18:58:42 +01:00
README.md clippy_lints: readme: don't mention crates.io since it is no longer used to publish clippy. 2020-03-10 01:05:54 +01:00

This crate contains Clippy lints. For the main crate, check GitHub.