mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 10:33:54 +00:00
chore: upgrade flaky_test, fastwebsockets, base64, base32, notify (#24746)
This commit is contained in:
parent
8e6b06b89d
commit
c79cb339ef
5 changed files with 108 additions and 127 deletions
|
@ -197,14 +197,14 @@ pub fn mixed_case_package_name_encode(name: &str) -> String {
|
|||
// use base32 encoding because it's reversible and the character set
|
||||
// only includes the characters within 0-9 and A-Z so it can be lower cased
|
||||
base32::encode(
|
||||
base32::Alphabet::RFC4648 { padding: false },
|
||||
base32::Alphabet::Rfc4648Lower { padding: false },
|
||||
name.as_bytes(),
|
||||
)
|
||||
.to_lowercase()
|
||||
}
|
||||
|
||||
pub fn mixed_case_package_name_decode(name: &str) -> Option<String> {
|
||||
base32::decode(base32::Alphabet::RFC4648 { padding: false }, name)
|
||||
base32::decode(base32::Alphabet::Rfc4648Lower { padding: false }, name)
|
||||
.and_then(|b| String::from_utf8(b).ok())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue