extern crate bh_alloc;
extern crate hashbrown;
#[global_allocator]
static ALLOC: bh_alloc::BumpAlloc = bh_alloc::BumpAlloc::INIT;
use hashbrown::HashMap;
#[test]
fn doc_example() {
let mut book_reviews = HashMap::new();
book_reviews.insert("Adventures of Huckleberry Finn", "My favorite book.");
book_reviews.insert("Grimms' Fairy Tales", "Masterpiece.");
book_reviews.insert("Pride and Prejudice", "Very enjoyable.");
book_reviews.insert("The Adventures of Sherlock Holmes", "Eye lyked it alot.");
assert!(!book_reviews.contains_key("Les Misérables"));
assert!(book_reviews.contains_key("The Adventures of Sherlock Holmes"));
book_reviews.remove("The Adventures of Sherlock Holmes");
assert!(!book_reviews.contains_key("The Adventures of Sherlock Holmes"));
assert_eq!(
book_reviews.get("Pride and Prejudice"),
Some(&"Very enjoyable.")
);
assert_eq!(book_reviews.get("Alice's Adventure in Wonderland"), None);
}