Rust

Rust

Made by DeepSource

Found potentially incomplete ASCII range RS-W1086

Bug risk
Major
Autofix

Letter ranges can be constructed by using the inclusive or exclusive range operators. However, ranges from 'a' to 'z' (or '1' to '9') constructed with the exclusive range operator exclude the upper bound: 'z' (or '9'), because such ranges are half open.

Ranges such as 'a'..'z' are probably unintentional. Consider using the inclusive range operator to include all the letters: 'a'..='z'. If this is intentional, make it clear by explicitly excluding the upper bound: 'a'..='y'.

Bad practice

for letter in 'a'..'z' {
    // ...
}

Recommended

for letter in 'a'..='z' {
    // ...
}