From 6844df304f3b15e0b3a07e48f42e29febb50b976 Mon Sep 17 00:00:00 2001 From: Ivan Nikulin Date: Sun, 21 Jan 2024 12:05:43 +0000 Subject: [PATCH] Remove Send + Sync bound for settings::Map keys --- foundations/src/settings/collections.rs | 32 +++++++++---------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/foundations/src/settings/collections.rs b/foundations/src/settings/collections.rs index dd188aa..d7fd2f7 100644 --- a/foundations/src/settings/collections.rs +++ b/foundations/src/settings/collections.rs @@ -28,12 +28,12 @@ use std::ops::{Deref, DerefMut}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Map(#[serde(bound = "")] IndexMap) where - K: Eq + Hash + Settings + Send + Sync + Clone + Serialize + DeserializeOwned + Debug + 'static, + K: Eq + Hash + Settings + Clone + Serialize + DeserializeOwned + Debug + 'static, V: Settings; impl Default for Map where - K: Eq + Hash + Settings + Send + Sync + Clone + Serialize + DeserializeOwned + Debug + 'static, + K: Eq + Hash + Settings + Clone + Serialize + DeserializeOwned + Debug + 'static, V: Settings, { fn default() -> Self { @@ -43,7 +43,7 @@ where impl Deref for Map where - K: Eq + Hash + Settings + Send + Sync + Clone + Serialize + DeserializeOwned + Debug + 'static, + K: Eq + Hash + Settings + Clone + Serialize + DeserializeOwned + Debug + 'static, V: Settings, { type Target = IndexMap; @@ -55,7 +55,7 @@ where impl DerefMut for Map where - K: Eq + Hash + Settings + Send + Sync + Clone + Serialize + DeserializeOwned + Debug + 'static, + K: Eq + Hash + Settings + Clone + Serialize + DeserializeOwned + Debug + 'static, V: Settings, { fn deref_mut(&mut self) -> &mut Self::Target { @@ -65,7 +65,7 @@ where impl From> for IndexMap where - K: Eq + Hash + Settings + Send + Sync + Clone + Serialize + DeserializeOwned + Debug + 'static, + K: Eq + Hash + Settings + Clone + Serialize + DeserializeOwned + Debug + 'static, V: Settings, { fn from(value: Map) -> Self { @@ -75,7 +75,7 @@ where impl From> for Map where - K: Eq + Hash + Settings + Send + Sync + Clone + Serialize + DeserializeOwned + Debug + 'static, + K: Eq + Hash + Settings + Clone + Serialize + DeserializeOwned + Debug + 'static, V: Settings, { fn from(value: IndexMap) -> Self { @@ -85,7 +85,7 @@ where impl FromIterator<(K, V)> for Map where - K: Eq + Hash + Settings + Send + Sync + Clone + Serialize + DeserializeOwned + Debug + 'static, + K: Eq + Hash + Settings + Clone + Serialize + DeserializeOwned + Debug + 'static, V: Settings, { fn from_iter>(iterable: I) -> Self { @@ -95,7 +95,7 @@ where impl<'a, K, V> IntoIterator for &'a Map where - K: Eq + Hash + Settings + Send + Sync + Clone + Serialize + DeserializeOwned + Debug + 'static, + K: Eq + Hash + Settings + Clone + Serialize + DeserializeOwned + Debug + 'static, V: Settings, { type Item = (&'a K, &'a V); @@ -108,7 +108,7 @@ where impl<'a, K, V> IntoIterator for &'a mut Map where - K: Eq + Hash + Settings + Send + Sync + Clone + Serialize + DeserializeOwned + Debug + 'static, + K: Eq + Hash + Settings + Clone + Serialize + DeserializeOwned + Debug + 'static, V: Settings, { type Item = (&'a K, &'a mut V); @@ -121,7 +121,7 @@ where impl IntoIterator for Map where - K: Eq + Hash + Settings + Send + Sync + Clone + Serialize + DeserializeOwned + Debug + 'static, + K: Eq + Hash + Settings + Clone + Serialize + DeserializeOwned + Debug + 'static, V: Settings, { type Item = (K, V); @@ -134,17 +134,7 @@ where impl Settings for Map where - K: Display - + Eq - + Hash - + Settings - + Send - + Sync - + Clone - + Serialize - + DeserializeOwned - + Debug - + 'static, + K: Display + Eq + Hash + Settings + Clone + Serialize + DeserializeOwned + Debug + 'static, V: Settings, { fn add_docs(