diff options
author | 2024-04-05 16:29:01 +0200 | |
---|---|---|
committer | 2024-04-05 16:29:01 +0200 | |
commit | 1d74478512faafdb2263b0d11773190c9efe3190 (patch) | |
tree | 88e1716350a01d1cad03637828e82bc23fe829be /src/ls_client.rs | |
parent | 0a1fa8873aa430f13735772cd0e8bff7c7ffc16c (diff) |
⬆️ (Cargo.toml): bump version to 0.1.2 for new release
♻️ (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
Diffstat (limited to 'src/ls_client.rs')
-rw-r--r-- | src/ls_client.rs | 5 |
1 files changed, 3 insertions, 2 deletions
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<LightstreamerClient, IllegalStateException> { - let connection_details = ConnectionDetails::new(server_address, adapter_set); + ) -> Result<LightstreamerClient, Box<dyn Error>> { + let connection_details = ConnectionDetails::new(server_address, adapter_set)?; let connection_options = ConnectionOptions::default(); Ok(LightstreamerClient { |