From 8eb949eb024bbf0f83106c37e3e506a5d3d9927a Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Sun, 9 Jul 2023 15:41:01 -0700 Subject: 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. --- src/diff/changes.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/diff/changes.rs') 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>, + changes: DftHashMap>, } impl<'a> ChangeMap<'a> { -- cgit v1.2.3