We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
#![warn(clippy::all)] fn main() { let end = 10; let start = 5; let mut i = end - start; if i != 0 { i -= 1; } println!("i: {}", i); }
could be optimized to
#![warn(clippy::all)] fn main() { let end = 10; let start = 5; let mut i = (end - start).saturating_sub(1); println!("i: {}", i); }