@@ -13,15 +13,12 @@ pub mod syntax;
13mod transaction;
13mod transaction;
15pub(crate) fn find_first_non_whitespace_char2(line: RopeSlice) -> Option<usize> {
15pub(crate) fn find_first_non_whitespace_char2(line: RopeSlice) -> Option<usize> {
18 // find first non-whitespace char
16 // find first non-whitespace char
19− for ch in line.chars() {
17+ for (start, ch) in line.chars().enumerate() {
20 // TODO: could use memchr with chunks?
18 // TODO: could use memchr with chunks?
21 if ch != ' ' && ch != '\t' && ch != '\n' {
19 if ch != ' ' && ch != '\t' && ch != '\n' {
22 return Some(start);
20 return Some(start);