Skip to content

Commit 72daef0

Browse files
committed
changed the way to count characters
1 parent 3374bcd commit 72daef0

File tree

1 file changed

+1
-1
lines changed
  • collector/runtime-benchmarks/asynctest/src

1 file changed

+1
-1
lines changed

collector/runtime-benchmarks/asynctest/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ async fn read_the_textfile(file_path: &str) -> io::Result<usize> {
1010
let mut total_characters = 0;
1111
for line in reader.lines() {
1212
let line = line?;
13-
total_characters += line.len();
13+
total_characters += line.expect("invalid character").chars().count();
1414
}
1515

1616
Ok(total_characters)

0 commit comments

Comments
 (0)