Fix quadratic time complexity with large strides (#6727)

This commit is contained in:
Doru 2022-10-14 17:17:47 -03:00 committed by GitHub
parent 5849e4f6e3
commit b7f47317c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -215,9 +215,7 @@ impl Iterator for EachWindowIterator {
} }
} }
for _ in 0..current_count { group = group[current_count..].to_vec();
let _ = group.remove(0);
}
} }
if group.is_empty() || current_count == 0 { if group.is_empty() || current_count == 0 {