More work on WASM handling.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-08-20 12:22:12 +02:00
parent 703fd2c147
commit 2d4253e155
36 changed files with 922 additions and 87 deletions

View File

@@ -1,3 +1,4 @@
use std::borrow::Borrow;
use std::fmt::{Display, Formatter};
use std::hash::{Hash, Hasher};
use std::ops::Deref;
@@ -5,7 +6,6 @@ use std::sync::{Arc, Mutex, Weak};
use conquer_once::OnceCell;
use hashbrown::HashMap;
use indexmap::Equivalent;
/// StringKey is an immutable string that is used for indexing of hashmaps or equality a lot.
/// By reference counting the string instead of copying, and caching the hash, we can get some
@@ -103,9 +103,9 @@ impl From<&str> for StringKey {
}
}
impl Equivalent<StringKey> for u32 {
fn equivalent(&self, key: &StringKey) -> bool {
*self == key.hash
impl Borrow<u32> for StringKey {
fn borrow(&self) -> &u32 {
&self.hash
}
}