Skip to content

Commit

Permalink
tir: use FxBuildHasher for scope hashing
Browse files Browse the repository at this point in the history
  • Loading branch information
feds01 committed Jul 20, 2023
1 parent 9f4a4f6 commit f371349
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/hash-tir/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::{

use derive_more::From;
use hash_storage::store::{statics::StoreId, SequenceStoreKey, StoreKey, TrivialSequenceStoreKey};
use hash_utils::itertools::Itertools;
use hash_utils::{fxhash::FxBuildHasher, itertools::Itertools};
use indexmap::IndexMap;

use crate::{
Expand Down Expand Up @@ -69,13 +69,13 @@ pub struct Scope {
/// The kind of the scope.
pub kind: ScopeKind,
/// The bindings of the scope
pub decls: RefCell<IndexMap<Symbol, Decl>>,
pub decls: RefCell<IndexMap<Symbol, Decl, FxBuildHasher>>,
}

impl Scope {
/// Create a new scope with the given kind.
pub fn with_empty_members(kind: ScopeKind) -> Self {
Self { kind, decls: RefCell::new(IndexMap::new()) }
Self { kind, decls: RefCell::new(IndexMap::default()) }
}

/// Add a binding to the scope.
Expand Down

0 comments on commit f371349

Please sign in to comment.