Registration fixes and improvements.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-09-16 11:01:37 +02:00
parent b1890681a1
commit 7bcfd92d45
20 changed files with 397 additions and 52 deletions

View File

@@ -1,5 +1,5 @@
use std::borrow::Borrow;
use std::ffi::CString;
use std::ffi::CStr;
use std::fmt::{Display, Formatter};
use std::hash::{Hash, Hasher};
use std::ops::Deref;
@@ -106,18 +106,11 @@ impl Display for StringKey {
}
}
impl Into<StringKey> for CString {
impl Into<StringKey> for &CStr {
fn into(self) -> StringKey {
StringKey::new(self.to_str().unwrap())
}
}
impl Into<StringKey> for &CString {
fn into(self) -> StringKey {
StringKey::new(self.to_str().unwrap())
}
}
/// Converts a character to lowercased in a const safe way.
const fn to_lower(c: u8) -> u8 {
if c >= b'A' && c <= b'Z' {