From 1d74478512faafdb2263b0d11773190c9efe3190 Mon Sep 17 00:00:00 2001 From: Daniel López Azaña Date: Fri, 5 Apr 2024 16:29:01 +0200 Subject: ⬆️ (Cargo.toml): bump version to 0.1.2 for new release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ♻️ (connection_details.rs): refactor `new` method to return Result for better error handling ✨ (connection_details.rs): set default adapter set to "DEFAULT" if none provided ✨ (ls_client.rs): update `new` method to handle Result from ConnectionDetails::new 🐛 (main.rs): fix subscription item list to include correct items ♻️ (main.rs): replace magic number with constant for max connection attempts --- src/ls_client.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ls_client.rs') diff --git a/src/ls_client.rs b/src/ls_client.rs index f3966cf..12fcd8b 100644 --- a/src/ls_client.rs +++ b/src/ls_client.rs @@ -496,6 +496,7 @@ impl LightstreamerClient { // "u" => { println!("Received data update from server: '{}'", clean_text); + }, // // Connection confirmation from server. @@ -703,8 +704,8 @@ impl LightstreamerClient { pub fn new( server_address: Option<&str>, adapter_set: Option<&str>, - ) -> Result { - let connection_details = ConnectionDetails::new(server_address, adapter_set); + ) -> Result> { + let connection_details = ConnectionDetails::new(server_address, adapter_set)?; let connection_options = ConnectionOptions::default(); Ok(LightstreamerClient { -- cgit v1.2.3