len should be chars()count()

This commit is contained in:
Henry Schimke
2023-01-09 17:44:38 -06:00
parent 7fe24575f1
commit c50e909450

View File

@@ -133,7 +133,7 @@ impl BitMatrix {
let mut first_run = true;
let mut nRows = 0;
let mut pos = 0;
while pos < string_representation.len() {
while pos < string_representation.chars().count() {
if string_representation.chars().nth(pos).unwrap() == '\n'
|| string_representation.chars().nth(pos).unwrap() == '\r'
{