From 65282048aefecda06f937ed670755b64b19ce9b1 Mon Sep 17 00:00:00 2001 From: daniloaz Date: Sat, 13 Apr 2024 21:24:12 +0200 Subject: ⬆️ (Cargo.toml): Bump lightstreamer-client version from 0.1.8 to 0.1.9 ✨ (Cargo.toml): Add colored dependency to enhance console output 📝 (README.md): Overhaul documentation to provide comprehensive details about the project, its features, usage, and contribution guidelines 💡 (client_listener.rs, client_message_listener.rs): Add newline at end of file to adhere to POSIX standards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ♻️ (connection_options.rs): Refactor code to improve readability and maintainability 🐛 (connection_options.rs): Rename 'reduce_head' to '_reduce_head' to indicate unused variable ♻️ (error.rs): Reorder imports and adjust formatting for consistency ♻️ (item_update.rs): Refactor code to improve readability and maintainability ♻️ (lib.rs): Reorder module imports for better organization ♻️ (ls_client.rs): Refactor code to improve readability and maintainability 💡 (main.rs): Update print statements to use colored output for changed fields 🐛 (main.rs): Fix import order to follow Rust's idiomatic style 🐛 (proxy.rs, subscription.rs, subscription_listener.rs): Add newline at end of file to follow POSIX standard ♻️ (subscription.rs, subscription_listener.rs): Refactor code to improve readability and maintainability 📝 (util.rs): Add newline at end of file to adhere to POSIX standards --- src/item_update.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/item_update.rs') diff --git a/src/item_update.rs b/src/item_update.rs index 7c43d93..fd95f90 100644 --- a/src/item_update.rs +++ b/src/item_update.rs @@ -133,7 +133,10 @@ impl ItemUpdate { .iter() .find(|(name, _)| self.get_field_position(name) == pos) .and_then(|(_, value)| value.as_deref()), - Err(_) => self.fields.get(field_name_or_pos).and_then(|v| v.as_deref()), + Err(_) => self + .fields + .get(field_name_or_pos) + .and_then(|v| v.as_deref()), } } @@ -162,10 +165,7 @@ impl ItemUpdate { /// # Returns /// A JSON Patch structure representing the difference between the new value and the previous one, /// or None if the difference in JSON Patch format is not available for any reason. - pub fn get_value_as_json_patch_if_available( - &self, - _field_name_or_pos: &str, - ) -> Option { + pub fn get_value_as_json_patch_if_available(&self, _field_name_or_pos: &str) -> Option { // Implementation pending None } @@ -232,10 +232,10 @@ impl ItemUpdate { /// /// # Returns /// The 1-based position of the field within the field list or field schema. - fn get_field_position(&self, field_name: &str) -> usize { + fn get_field_position(&self, _field_name: &str) -> usize { // Implementation pending // This method should return the 1-based position of the field based on the field list or field schema // If the field is not found, it should raise an IllegalArgumentException unimplemented!() } -} \ No newline at end of file +} -- cgit v1.2.3