Make sure to drop suffix from symbols exposed to the host

This commit is contained in:
Agus Zubiaga 2024-10-24 20:28:43 -03:00
parent be0afbce25
commit e3c6b756d3
No known key found for this signature in database
4 changed files with 22 additions and 15 deletions

View file

@ -156,6 +156,10 @@ impl Symbol {
})
}
pub fn as_unsuffixed_str(self, interns: &Interns) -> &str {
self.as_str(interns).trim_end_matches('!')
}
pub const fn as_u64(self) -> u64 {
u64::from_ne_bytes(self.to_ne_bytes())
}