diff options
author | Wilfred Hughes <me@wilfred.me.uk> | 2023-07-09 15:41:01 -0700 |
---|---|---|
committer | Wilfred Hughes <me@wilfred.me.uk> | 2023-07-09 15:41:01 -0700 |
commit | 8eb949eb024bbf0f83106c37e3e506a5d3d9927a (patch) | |
tree | a2058de5e0d1ac618327db1a5a6237035ce99343 /src/diff/changes.rs | |
parent | d9911e0b49c030d3b84fec36c3fa8a25317a5398 (diff) |
Use DftHashMap everywhere
This is a 4% reduction in instructions for typing_before.ml, but a
0.2% increase instructions for slow_before.rs. This seems like a win
overall, and it also keeps the codebase more consistent and simpler.
Diffstat (limited to 'src/diff/changes.rs')
-rw-r--r-- | src/diff/changes.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/diff/changes.rs b/src/diff/changes.rs index af80df5ab..0234be2bc 100644 --- a/src/diff/changes.rs +++ b/src/diff/changes.rs @@ -1,8 +1,9 @@ //! Data types that track the change state for syntax nodes. -use rustc_hash::FxHashMap; - -use crate::parse::syntax::{Syntax, SyntaxId}; +use crate::{ + hash::DftHashMap, + parse::syntax::{Syntax, SyntaxId}, +}; #[derive(PartialEq, Eq, Clone, Copy)] pub enum ChangeKind<'a> { @@ -14,7 +15,7 @@ pub enum ChangeKind<'a> { #[derive(Debug, Default)] pub struct ChangeMap<'a> { - changes: FxHashMap<SyntaxId, ChangeKind<'a>>, + changes: DftHashMap<SyntaxId, ChangeKind<'a>>, } impl<'a> ChangeMap<'a> { |