Depend on nohash-hasher individually

This commit is contained in:
Ariel Davis 2023-05-04 16:28:15 -07:00
parent 1d678cf6a0
commit 4a1922fd1a
20 changed files with 53 additions and 52 deletions

View file

@ -5,7 +5,7 @@
#[cfg(test)]
mod tests;
use nohash_hasher::IntMap as NoHashHashMap;
use nohash_hasher::IntMap;
pub use text_size::{TextRange, TextSize};
@ -15,7 +15,7 @@ pub struct LineIndex {
/// Offset the beginning of each line, zero-based.
newlines: Vec<TextSize>,
/// List of non-ASCII characters on each line.
line_wide_chars: NoHashHashMap<u32, Vec<WideChar>>,
line_wide_chars: IntMap<u32, Vec<WideChar>>,
}
/// Line/Column information in native, utf8 format.
@ -80,7 +80,7 @@ impl WideChar {
impl LineIndex {
/// Returns a `LineIndex` for the `text`.
pub fn new(text: &str) -> LineIndex {
let mut line_wide_chars = NoHashHashMap::default();
let mut line_wide_chars = IntMap::default();
let mut wide_chars = Vec::new();
let mut newlines = Vec::with_capacity(16);