From c50e909450e73f577a37c45e52ac048a67824df2 Mon Sep 17 00:00:00 2001 From: Henry Schimke Date: Mon, 9 Jan 2023 17:44:38 -0600 Subject: [PATCH] len should be chars()count() --- src/common/bit_matrix.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/bit_matrix.rs b/src/common/bit_matrix.rs index 7be18bd..f08ab67 100644 --- a/src/common/bit_matrix.rs +++ b/src/common/bit_matrix.rs @@ -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' {