From bfad49bfa7400435ccf161daa1e69e471874608c Mon Sep 17 00:00:00 2001 From: "chengmiaomiao.123" Date: Mon, 8 Jan 2024 15:04:27 +0800 Subject: [PATCH] add clone derive for TypeMap and Faststr Map --- src/faststr_map.rs | 2 +- src/type_map.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/faststr_map.rs b/src/faststr_map.rs index 1514fc8..b288533 100644 --- a/src/faststr_map.rs +++ b/src/faststr_map.rs @@ -6,7 +6,7 @@ use fxhash::FxHashMap; /// This is an optimized version of TypeMap to FastStr that eliminates the need to Box the values. /// /// This map is suitable for T that impls both From and Into. -#[derive(Debug, Default)] +#[derive(Debug, Default, Clone)] pub struct FastStrMap { inner: FxHashMap, } diff --git a/src/type_map.rs b/src/type_map.rs index 052639c..2523c6b 100644 --- a/src/type_map.rs +++ b/src/type_map.rs @@ -63,7 +63,7 @@ impl<'a, K, V> Entry<'a, K, V> { } } -#[derive(Debug, Default)] +#[derive(Debug, Default, Clone)] pub struct TypeMap { inner: FxHashMap, }