Update Wasmer, log load times, some minor performance tweaks
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-12-25 11:26:14 +01:00
parent f4d09a8915
commit 055fbfba78
6 changed files with 82 additions and 13 deletions

View File

@@ -129,10 +129,13 @@ impl ValueIdentifiable for StringKey {
}
}
/// The difference in ascii characters to translate from uppercase to lowercase.
const CAPITAL_DIFF: u8 = b'a' - b'A';
/// Converts a character to lowercased in a const safe way.
const fn to_lower(c: u8) -> u8 {
if c >= b'A' && c <= b'Z' {
return c + (b'a' - b'A');
return c + CAPITAL_DIFF;
}
c
}