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/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 87fd834..67276a8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -67,7 +67,7 @@ async fn main() -> Result<(), Box> { let mut my_subscription = Subscription::new( SubscriptionMode::Merge, Some(vec![ - "item1".to_string(), + "item2".to_string(), "item2".to_string(), "item3".to_string(), ]), @@ -124,7 +124,7 @@ async fn main() -> Result<(), Box> { } } - if retry_counter == 5 { + if retry_counter == MAX_CONNECTION_ATTEMPTS { println!("Failed to connect after {} retries. Exiting...", retry_counter); } else { println!("Exiting orderly from Lightstreamer client..."); -- cgit v1.2.3