Closes #1219 false positive for explicit_counter_loop
This commit is contained in:
parent
ebb88a4208
commit
4b668159d2
@ -571,3 +571,19 @@ mod issue_2496 {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
mod issue_1219 {
|
||||
// potential false positive for explicit_counter_loop
|
||||
pub fn test() {
|
||||
let thing = 5;
|
||||
let text = "banana";
|
||||
let mut count = 0;
|
||||
for ch in text.chars() {
|
||||
if ch == 'a' {
|
||||
continue;
|
||||
}
|
||||
count += 1
|
||||
}
|
||||
println!("{}", count);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user