diff options
Diffstat (limited to 'crates/rebel-parse')
-rw-r--r-- | crates/rebel-parse/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/rebel-parse/src/ast/expr.rs | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/rebel-parse/Cargo.toml b/crates/rebel-parse/Cargo.toml index 7159976..95d2acd 100644 --- a/crates/rebel-parse/Cargo.toml +++ b/crates/rebel-parse/Cargo.toml @@ -11,6 +11,7 @@ edition = "2021" peg = "0.8.3" phf = { version = "0.11.2", features = ["macros"] } rebel-common = { path = "../rebel-common" } +rustc-hash = "1.1.0" [dev-dependencies] clap = { version = "4.0.0", features = ["derive"] } diff --git a/crates/rebel-parse/src/ast/expr.rs b/crates/rebel-parse/src/ast/expr.rs index 3994296..341b8ad 100644 --- a/crates/rebel-parse/src/ast/expr.rs +++ b/crates/rebel-parse/src/ast/expr.rs @@ -1,7 +1,6 @@ -use std::collections::HashSet; - use super::{Block, DestrPat, Ident, Path, ValidationError}; use crate::token; +use rustc_hash::FxHashSet; pub use token::StrKind; @@ -226,7 +225,7 @@ impl<'a> Literal<'a> { Ok(()) } Literal::Struct(entries) => { - let mut fields = HashSet::new(); + let mut fields = FxHashSet::default(); for StructField { name, value } in entries { if !fields.insert(name) { return Err(ValidationError::DuplicateKey); |