From 37582b2f0dfbaad738ad77de88bd87b9e277c2a6 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:59:24 +0100 Subject: [PATCH] chore: shorten map type alias names (#824) --- crates/primitives/src/map/fixed.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/crates/primitives/src/map/fixed.rs b/crates/primitives/src/map/fixed.rs index 6e1af0a10..0aa3ecdd5 100644 --- a/crates/primitives/src/map/fixed.rs +++ b/crates/primitives/src/map/fixed.rs @@ -7,9 +7,13 @@ use core::{ }; /// [`HashMap`] optimized for hashing [fixed-size byte arrays](FixedBytes). -pub type FbHashMap = HashMap, V, FbBuildHasher>; +pub type FbMap = HashMap, V, FbBuildHasher>; +#[doc(hidden)] +pub type FbHashMap = FbMap; /// [`HashSet`] optimized for hashing [fixed-size byte arrays](FixedBytes). -pub type FbHashSet = HashSet, FbBuildHasher>; +pub type FbSet = HashSet, FbBuildHasher>; +#[doc(hidden)] +pub type FbHashSet = FbSet; cfg_if! { if #[cfg(feature = "map-indexmap")] { @@ -26,9 +30,13 @@ macro_rules! fb_alias_maps { ($($ty:ident < $n:literal >),* $(,)?) => { paste::paste! { $( #[doc = concat!("[`HashMap`] optimized for hashing [`", stringify!($ty), "`].")] - pub type [<$ty HashMap>] = HashMap<$ty, V, FbBuildHasher<$n>>; + pub type [<$ty Map>] = HashMap<$ty, V, FbBuildHasher<$n>>; + #[doc(hidden)] + pub type [<$ty HashMap>] = [<$ty Map>]; #[doc = concat!("[`HashSet`] optimized for hashing [`", stringify!($ty), "`].")] - pub type [<$ty HashSet>] = HashSet<$ty, FbBuildHasher<$n>>; + pub type [<$ty Set>] = HashSet<$ty, FbBuildHasher<$n>>; + #[doc(hidden)] + pub type [<$ty HashSet>] = [<$ty Set>]; cfg_if! { if #[cfg(feature = "map-indexmap")] {