use std;
use std::hash::Hash;
use std::collections::{BTreeMap, HashMap};
#[allow(unsafe_code)]
pub(crate) fn slice_u8_to_slice_u32(input: &[u8]) -> &[u32] {
assert_eq!(input.len() % 4, 0);
unsafe { std::mem::transmute(input) }
}
pub(crate) fn btreemap_to_hashmap<A: Eq + Hash, B>(btree: BTreeMap<A, B>) -> HashMap<A, B> {
let mut hash = HashMap::new();
hash.extend(btree.into_iter());
hash
}
pub(crate) fn hashmap_to_btreemap<A: Ord + Hash, B>(hash: HashMap<A, B>) -> BTreeMap<A, B> {
let mut btree = BTreeMap::new();
btree.extend(hash.into_iter());
btree
}