Move hashbrown behind no_std feature
This commit is contained in:
parent
0476d7cdbb
commit
14d0ceb81b
2 changed files with 8 additions and 3 deletions
|
|
@ -3,10 +3,14 @@ use alloc::string::String;
|
|||
use alloc::sync::Arc;
|
||||
use alloc::vec::Vec;
|
||||
use core::fmt;
|
||||
use core::hash::BuildHasherDefault;
|
||||
use core::ops::{Deref, DerefMut};
|
||||
|
||||
type HashMap<K, V> = hashbrown::HashMap<K, V, BuildHasherDefault<rustc_hash::FxHasher>>;
|
||||
type BuildHasher = core::hash::BuildHasherDefault<rustc_hash::FxHasher>;
|
||||
|
||||
#[cfg(feature = "no_std")]
|
||||
type HashMap<K, V> = hashbrown::HashMap<K, V, BuildHasher>;
|
||||
#[cfg(not(feature = "no_std"))]
|
||||
type HashMap<K, V> = std::collections::HashMap<K, V, BuildHasher>;
|
||||
|
||||
// re-export fontdb and rustybuzz
|
||||
pub use fontdb;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue