diff --git a/Cargo.lock b/Cargo.lock index 64b49ef..c4c09ef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -29,6 +29,7 @@ version = "0.2.0" dependencies = [ "either", "ordered-float", + "rustc-hash", ] [[package]] @@ -39,3 +40,9 @@ checksum = "4a91171844676f8c7990ce64959210cd2eaef32c2612c50f9fae9f8aaa6065a6" dependencies = [ "num-traits", ] + +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" diff --git a/Cargo.toml b/Cargo.toml index 22ebe75..08dd734 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,3 +8,4 @@ rust-version = "1.80.1" [dependencies] either = "1.13.0" ordered-float = "4.2.2" +rustc-hash = "2.0.0" diff --git a/src/book.rs b/src/book.rs index ed29fd5..68b6c65 100644 --- a/src/book.rs +++ b/src/book.rs @@ -1,8 +1,9 @@ use either::Either; use ordered_float::OrderedFloat; +use rustc_hash::FxHashMap as HashMap; use std::cell::Cell; use std::cmp::min; -use std::collections::{BTreeMap, HashMap, VecDeque}; +use std::collections::{BTreeMap, VecDeque}; use std::fmt; use std::rc::Rc;