-use std::convert::TryInto;
-use std::hash::Hash;
-use std::hash::{Hasher, BuildHasherDefault};
-#[cfg(test)]
-use std::mem;
-use std::ops::{Index, IndexMut};
+#[cfg(feature = "hashbrown")]
+use hashbrown::hash_map::{self, HashMap};
+#[cfg(not(feature = "std"))]
+use alloc::boxed::Box;
+use core::convert::TryInto;
+use core::hash::Hash;
+use core::hash::{Hasher, BuildHasherDefault};
+use core::ops::{Index, IndexMut};