clean up potential_query_instability with FxIndexMap and UnordMap

This commit is contained in:
yukang
2024-02-11 19:50:50 +08:00
parent b381d3ab27
commit 3f27e4b3ea
30 changed files with 122 additions and 139 deletions

View File

@@ -524,6 +524,11 @@ impl<K: Eq + Hash, V> UnordMap<K, V> {
UnordItems(self.inner.into_iter())
}
#[inline]
pub fn keys(&self) -> UnordItems<&K, impl Iterator<Item = &K>> {
UnordItems(self.inner.keys())
}
/// Returns the entries of this map in stable sort order (as defined by `ToStableHashKey`).
///
/// The `cache_sort_key` parameter controls if [slice::sort_by_cached_key] or