summaryrefslogtreecommitdiffstats
path: root/crates/rebel-parse
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2024-05-04 20:23:54 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2024-05-04 20:41:12 +0200
commit363af42e5fc6d84f2048dc61b863ee1292abf91e (patch)
tree503b6160c2e87b405479bbfc8bde1504f3059d9b /crates/rebel-parse
parent318a842241fccef0184c69e31a7d08306799c6c6 (diff)
downloadrebel-363af42e5fc6d84f2048dc61b863ee1292abf91e.tar
rebel-363af42e5fc6d84f2048dc61b863ee1292abf91e.zip
rebel-parse, rebel-lang: switch to rustc-hash
Diffstat (limited to 'crates/rebel-parse')
-rw-r--r--crates/rebel-parse/Cargo.toml1
-rw-r--r--crates/rebel-parse/src/ast/expr.rs5
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);