From 08f5ff936b4693bfd7cf9a4e33858d133cbd59bf Mon Sep 17 00:00:00 2001 From: jofas Date: Sun, 28 Jan 2024 16:10:48 +0100 Subject: [PATCH] removed deprecated macros --- CHANGELOG.md | 12 ++++++++++-- src/_std.rs | 30 ------------------------------ 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 912e104..cff6b52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * `hashbrown::hash_set` macro +### Removed + +* `map` macro + +* `map_e` macro + +* `set` macro + ## [0.2.6] @@ -63,7 +71,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -* enhanced performance of `vec_no_clone` macro when used with a +* Enhanced performance of `vec_no_clone` macro when used with a list of elements @@ -71,7 +79,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -* better allocation performace for all collections +* Better allocation performace for all collections ## [0.2.2] diff --git a/src/_std.rs b/src/_std.rs index 75a6263..47ced38 100644 --- a/src/_std.rs +++ b/src/_std.rs @@ -22,16 +22,6 @@ macro_rules! hash_map { }; } -/// Deprecated. Use [`hash_map!`] instead. -/// -#[deprecated = "deprecated in favour of `hash_map!`. Will be removed in `map-macro v0.3.0`"] -#[macro_export] -macro_rules! map { - {$($k: expr => $v: expr),* $(,)?} => { - ::std::collections::HashMap::from([$(($k, $v),)*]) - }; -} - /// Explicitly typed equivalent of [`hash_map!`], suitable for /// [trait object values](crate#explicitly-typed-values-for-trait-objects). /// @@ -60,16 +50,6 @@ macro_rules! hash_map_e { }; } -/// Deprecated. Use [`hash_map_e!`] instead. -/// -#[deprecated = "deprecated in favour of `hash_map_e!`. Will be removed in `map-macro v0.3.0`"] -#[macro_export] -macro_rules! map_e { - {$($k: expr => $v: expr),* $(,)?} => { - ::std::collections::HashMap::from([$(($k, $v as _),)*]) - }; -} - /// Macro for creating a [`BTreeMap`](::std::collections::BTreeMap). /// /// Syntactic sugar for [`BTreeMap::from`](::std::collections::BTreeMap::from). @@ -141,16 +121,6 @@ macro_rules! hash_set { }; } -/// Deprecated. Use [`hash_set!`] instead. -/// -#[deprecated = "deprecated in favour of `hash_set!`. Will be removed in `map-macro v0.3.0`"] -#[macro_export] -macro_rules! set { - {$($v: expr),* $(,)?} => { - ::std::collections::HashSet::from([$($v,)*]) - }; -} - /// Macro for creating a [`BTreeSet`](::std::collections::BTreeSet). /// /// Syntactic sugar for [`BTreeSet::from`](::std::collections::BTreeSet::from).