From f79cf6ed236874f2245c91c8df7141ef0b3b66e3 Mon Sep 17 00:00:00 2001 From: Zachary Harrold Date: Tue, 22 Apr 2025 00:57:01 +1000 Subject: [PATCH] Remove `indexmap/std` from `wgsl-in` (#7586) --- naga/Cargo.toml | 8 +------- naga/src/diagnostic_filter.rs | 6 +++--- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/naga/Cargo.toml b/naga/Cargo.toml index dce7b04b76..a522a7998d 100644 --- a/naga/Cargo.toml +++ b/naga/Cargo.toml @@ -58,13 +58,7 @@ arbitrary = [ ] spv-in = ["dep:petgraph", "dep:spirv"] spv-out = ["dep:spirv"] -wgsl-in = [ - "dep:hexf-parse", - "dep:strum", - "dep:unicode-ident", - "indexmap/std", - "compact", -] +wgsl-in = ["dep:hexf-parse", "dep:strum", "dep:unicode-ident", "compact"] wgsl-out = [] ## Enables outputting to HLSL (Microsoft's High-Level Shader Language). diff --git a/naga/src/diagnostic_filter.rs b/naga/src/diagnostic_filter.rs index 37fb926121..16b8de6699 100644 --- a/naga/src/diagnostic_filter.rs +++ b/naga/src/diagnostic_filter.rs @@ -4,12 +4,12 @@ use alloc::boxed::Box; use crate::{Arena, Handle}; +#[cfg(feature = "wgsl-in")] +use crate::FastIndexMap; #[cfg(feature = "wgsl-in")] use crate::Span; #[cfg(feature = "arbitrary")] use arbitrary::Arbitrary; -#[cfg(feature = "wgsl-in")] -use indexmap::IndexMap; #[cfg(feature = "deserialize")] use serde::Deserialize; #[cfg(feature = "serialize")] @@ -133,7 +133,7 @@ pub(crate) enum ShouldConflictOnFullDuplicate { /// [`add`]: DiagnosticFilterMap::add #[derive(Clone, Debug, Default)] #[cfg(feature = "wgsl-in")] -pub(crate) struct DiagnosticFilterMap(IndexMap); +pub(crate) struct DiagnosticFilterMap(FastIndexMap); #[cfg(feature = "wgsl-in")] impl DiagnosticFilterMap {