Skip to content

Commit

Permalink
correct expect message
Browse files Browse the repository at this point in the history
  • Loading branch information
JSorngard committed Jan 29, 2024
1 parent 13fb395 commit 8875b54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ pub fn zalgo_encode(string: &str) -> Result<String, Error> {
// All of this means that the value that starts at this index is a utf-8 encoded
// character, which `chars.next()` will extract.
let char = string[i*BATCH_SIZE + j..].chars().next()
.expect("i + j is within the string and on a char boundary, so string.chars().next() should find a char");
.expect("i*BATCH_SIZE + j is within the string and on a char boundary, so string.chars().next() should find a char");
return Err(Error::NotAscii(char, line, column));
}
}
Expand Down

0 comments on commit 8875b54

Please sign in to comment.