diff --git a/crates/platform-tags/src/lib.rs b/crates/platform-tags/src/lib.rs index 72f19ba7d..6bbd4c285 100644 --- a/crates/platform-tags/src/lib.rs +++ b/crates/platform-tags/src/lib.rs @@ -1,5 +1,6 @@ use std::num::NonZeroU32; use std::str::FromStr; +use std::sync::Arc; use rustc_hash::FxHashMap; @@ -24,7 +25,8 @@ pub enum TagsError { #[derive(Debug, Clone)] pub struct Tags { /// python_tag |--> abi_tag |--> platform_tag |--> priority - map: FxHashMap>>, + #[allow(clippy::type_complexity)] + map: Arc>>>, } impl Tags { @@ -42,7 +44,7 @@ impl Tags { .entry(platform.to_string()) .or_insert(TagPriority::try_from(index).expect("valid tag priority")); } - Self { map } + Self { map: Arc::new(map) } } /// Returns the compatible tags for the given Python implementation (e.g., `cpython`), version,