Skip to content

Commit

Permalink
rename nonprintable_char_repr to nonprintable_ascii_repr
Browse files Browse the repository at this point in the history
  • Loading branch information
JSorngard committed Jan 29, 2024
1 parent 4e07aa7 commit 8642f5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ pub fn zalgo_encode(string: &str) -> Result<String, Error> {
encoded += 2;
column += 1;
} else {
match nonprintable_char_repr(*byte) {
match nonprintable_ascii_repr(*byte) {
Some(repr) => return Err(Error::UnencodableAscii(*byte, line, column, repr)),
None => {
// The panic should never trigger since we know that string[i*BATCH_SIZE + j]
Expand Down Expand Up @@ -384,7 +384,7 @@ pub fn zalgo_wrap_python(python: &str) -> Result<String, Error> {
/// Returns the representation of the given ASCII byte if it's not printable.
#[inline]
#[must_use = "the function returns a new value and does not modify the input"]
const fn nonprintable_char_repr(byte: u8) -> Option<&'static str> {
const fn nonprintable_ascii_repr(byte: u8) -> Option<&'static str> {
if byte < 10 {
Some(
[
Expand Down

0 comments on commit 8642f5e

Please sign in to comment.