diff --git a/pkstrings/src/pkstring.rs b/pkstrings/src/pkstring.rs index 1b308c9..252a3b4 100644 --- a/pkstrings/src/pkstring.rs +++ b/pkstrings/src/pkstring.rs @@ -36,7 +36,7 @@ const fn in_range(ord: u8) -> bool { } } -const fn strtohex(chr: &char) -> Option { +const fn chrtohex(chr: &char) -> Option { Some(match chr { cap @ 'A'..='Z' => 0x80 - ('A' as u8) + (*cap as u8), '(' => 0x9a, @@ -182,7 +182,7 @@ impl TryFrom<&str> for PKString { let mut buf = Vec::with_capacity(data.len()); for chr in data.chars() { - match strtohex(&chr) { + match chrtohex(&chr) { Some(ord) => buf.push(ord), None => return Err(Error::InvalidCharacter(chr)), }