Closes #1219 false positive for explicit_counter_loop

This commit is contained in:
Josh Mcguigan 2018-09-05 19:14:01 -07:00
parent ebb88a4208
commit 4b668159d2

View File

@ -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);
}
}