From 222a037c5b5832c52e97c700d624e5d8cf06549a Mon Sep 17 00:00:00 2001 From: Maximilian Schmidt Date: Wed, 1 May 2024 16:19:08 +0200 Subject: [PATCH] remove unused code --- .../src/server/outputs/provider.rs | 20 ------------------- .../src/server/parameters/storage.rs | 9 --------- .../src/server/parameters/subscriptions.rs | 19 ------------------ crates/path_serde/src/error.rs | 2 -- crates/path_serde/src/lib.rs | 1 - 5 files changed, 51 deletions(-) delete mode 100644 crates/path_serde/src/error.rs diff --git a/crates/communication/src/server/outputs/provider.rs b/crates/communication/src/server/outputs/provider.rs index 75a1874eeb..b6e15b2559 100644 --- a/crates/communication/src/server/outputs/provider.rs +++ b/crates/communication/src/server/outputs/provider.rs @@ -388,26 +388,6 @@ mod tests { } } - // impl PathDeserialize for OutputsFake - // where - // for<'a> T: Deserialize<'a> + Serialize, - // { - // fn deserialize_path<'de, D>( - // &mut self, - // path: &str, - // deserializer: D, - // ) -> Result<(), deserialize::Error> - // where - // D: Deserializer<'de>, - // { - // self.existing_fields.insert( - // path.to_string(), - // T::deserialize(deserializer).map_err(deserialize::Error::DeserializationFailed)?, - // ); - // Ok(()) - // } - // } - impl PathIntrospect for OutputsFake { fn extend_with_fields(fields: &mut BTreeSet, _prefix: &str) { fields.insert("a".to_string()); diff --git a/crates/communication/src/server/parameters/storage.rs b/crates/communication/src/server/parameters/storage.rs index f7b9173f5e..9812781939 100644 --- a/crates/communication/src/server/parameters/storage.rs +++ b/crates/communication/src/server/parameters/storage.rs @@ -241,15 +241,6 @@ mod tests { } } - // impl PathIntrospect for ParametersFake - // { - // fn extend_with_fields(fields: &mut BTreeSet, _prefix: &str) { - // fields.insert("a".to_string()); - // fields.insert("a.b".to_string()); - // fields.insert("a.b.c".to_string()); - // } - // } - #[tokio::test] async fn update_request_writes_parameters_and_notifies() { let path = "a.b.c".to_string(); diff --git a/crates/communication/src/server/parameters/subscriptions.rs b/crates/communication/src/server/parameters/subscriptions.rs index 9cbbd2c5ff..0626b39ec9 100644 --- a/crates/communication/src/server/parameters/subscriptions.rs +++ b/crates/communication/src/server/parameters/subscriptions.rs @@ -377,25 +377,6 @@ mod tests { } } - // fn deserialize_path<'de, D>( - // &mut self, - // path: &str, - // deserializer: D, - // ) -> Result<(), Error> - // where - // D: Deserializer<'de>, - // { - // self.existing_fields.insert( - // path.to_string(), - // T::deserialize(deserializer).map_err(Error::DeserializationFailed)?, - // ); - // Ok(()) - // } - // - // fn exists(field_path: &str) -> bool { - // field_path == "a.b.c" - // } - // impl PathIntrospect for ParametersFake { fn extend_with_fields(fields: &mut BTreeSet, _prefix: &str) { fields.insert("a".to_string()); diff --git a/crates/path_serde/src/error.rs b/crates/path_serde/src/error.rs deleted file mode 100644 index 139597f9cb..0000000000 --- a/crates/path_serde/src/error.rs +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/crates/path_serde/src/lib.rs b/crates/path_serde/src/lib.rs index e3b3407a7a..a5787f98a6 100644 --- a/crates/path_serde/src/lib.rs +++ b/crates/path_serde/src/lib.rs @@ -4,7 +4,6 @@ pub use path_serde_derive::{PathDeserialize, PathIntrospect, PathSerialize}; pub use serialize::PathSerialize; pub mod deserialize; -pub mod error; mod implementation; pub mod introspect; mod not_supported;