From 3c6c63005e5faf306f4de2b3c730813b3a05d630 Mon Sep 17 00:00:00 2001
From: Silas Bartha <silas@exvacuum.dev>
Date: Tue, 24 Dec 2024 22:11:21 -0500
Subject: [PATCH] Added minor versions to dependencies to avoid breaking
 changes, fixed some type mismatch errors

---
 Cargo.toml       | 32 ++++++++++++++++----------------
 src/error.rs     |  1 -
 src/ls_client.rs |  4 ++--
 src/main.rs      |  2 +-
 4 files changed, 19 insertions(+), 20 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index 69ea37c..b049c96 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "lightstreamer-client"
-version = "0.1.9"
+version = "0.1.10"
 edition = "2021"
 authors = ["Daniel López Azaña <daniloaz@gmail.com>"]
 description = "A Rust client for Lightstreamer, designed to facilitate real-time communication with Lightstreamer servers."
@@ -11,18 +11,18 @@ documentation = "https://github.com/daniloaz/lightstreamer-client#readme"
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
 [dependencies]
-colored = "2"
-cookie = { version = "0", features = ["percent-encode"]}
-futures = "0"
-futures-util = "0"
-json-patch = "1"
-reqwest = { version = "0", features = ["json", "stream"] }
-serde = { version = "1", features = ["derive"] }
-serde_json = { version = "1" }
-serde_urlencoded = "0"
-signal-hook = "0"
-tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
-tokio-tungstenite = { version = "0", features = ["native-tls"] }
-tracing = "0.1.40"
-tracing-subscriber = "0.3.18"
-url = "2"
+colored = "2.2"
+cookie = { version = "0.18", features = ["percent-encode"]}
+futures = "0.3"
+futures-util = "0.3"
+json-patch = "3.0"
+reqwest = { version = "0.12", features = ["json", "stream"] }
+serde = { version = "1.0", features = ["derive"] }
+serde_json = "1.0"
+serde_urlencoded = "0.7"
+signal-hook = "0.3"
+tokio = { version = "1.42", features = ["macros", "rt-multi-thread"] }
+tokio-tungstenite = { version = "0.26", features = ["native-tls"] }
+tracing = "0.1"
+tracing-subscriber = "0.3"
+url = "2.5"
diff --git a/src/error.rs b/src/error.rs
index 0888818..33c6ff8 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -1,6 +1,5 @@
 use std::error::Error;
 use std::fmt;
-use tracing::error;
 
 #[derive(Debug)]
 pub struct IllegalArgumentException(String);
diff --git a/src/ls_client.rs b/src/ls_client.rs
index f4f72db..9aacab6 100644
--- a/src/ls_client.rs
+++ b/src/ls_client.rs
@@ -424,7 +424,7 @@ impl LightstreamerClient {
                                                 }
                                                 let encoded_params = serde_urlencoded::to_string(&params)?;
                                                 write_stream
-                                                    .send(Message::Text(format!("control\r\n{}", encoded_params)))
+                                                    .send(Message::Text(format!("control\r\n{}", encoded_params).into()))
                                                     .await?;
                                                 info!("Sent subscription request: '{}'", encoded_params);
                                             }
@@ -712,7 +712,7 @@ impl LightstreamerClient {
                                         params.push(("LS_protocol", Self::TLCP_VERSION));
                                         let encoded_params = serde_urlencoded::to_string(&params)?;
                                         write_stream
-                                            .send(Message::Text(format!("create_session\r\n{}\n", encoded_params)))
+                                            .send(Message::Text(format!("create_session\r\n{}\n", encoded_params).into()))
                                             .await?;
                                         self.make_log( Level::DEBUG, &format!("Sent create session request: '{}'", encoded_params) );
                                     },
diff --git a/src/main.rs b/src/main.rs
index 2da215c..32e85e8 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -63,7 +63,7 @@ impl SubscriptionListener for MySubscriptionListener {
         ];
         let mut output = String::new();
         for field in fields {
-            let value = update.get_value(field).unwrap_or(&not_available).clone();
+            let value = update.get_value(field).unwrap_or(&not_available);
             let value_str = if update.changed_fields.contains_key(field) {
                 value.yellow().to_string()
             } else {