style(tests): do not use .as_bytes().len() on strings

This commit is contained in:
Samuel Tardieu 2024-09-22 13:15:04 +02:00 committed by Amaan Qureshi
parent c1f8a8a728
commit 1aa28e04ee
2 changed files with 2 additions and 2 deletions

View file

@ -124,7 +124,7 @@ fn test_parsing_with_custom_utf8_input() {
let row = position.row;
let column = position.column;
if row < lines.len() {
if column < lines[row].as_bytes().len() {
if column < lines[row].len() {
&lines[row].as_bytes()[column..]
} else {
b"\n"