Skip to content

Commit 33ae4ec

Browse files
authored
fix: update deps (#93)
1 parent b2ebad0 commit 33ae4ec

File tree

8 files changed

+21
-20
lines changed

8 files changed

+21
-20
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ relay_rpc = { path = "./relay_rpc", optional = true }
2222
[dev-dependencies]
2323
anyhow = "1"
2424
structopt = { version = "0.3", default-features = false }
25-
tokio = { version = "1.22", features = ["full"] }
25+
tokio = { version = "1.47", features = ["full"] }
2626
url = "2.3"
2727
warp = { version = "0.3", default-features = false }
2828
serde_json = "1.0"
29-
rand = "0.8.5"
29+
rand = "0.8"
3030
futures-util = "0.3"
3131
once_cell = "1.19"
3232

examples/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ impl ConnectionHandler for Handler {
3939
println!("[{}] connection open", self.name);
4040
}
4141

42-
fn disconnected(&mut self, frame: Option<CloseFrame<'static>>) {
42+
fn disconnected(&mut self, frame: Option<CloseFrame>) {
4343
println!("[{}] connection closed: frame={frame:?}", self.name);
4444
}
4545

examples/websocket_client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ impl ConnectionHandler for Handler {
3838
println!("[{}] connection open", self.name);
3939
}
4040

41-
fn disconnected(&mut self, frame: Option<CloseFrame<'static>>) {
41+
fn disconnected(&mut self, frame: Option<CloseFrame>) {
4242
println!("[{}] connection closed: frame={frame:?}", self.name);
4343
}
4444

relay_client/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ serde_qs = "0.10"
1818
pin-project = "1.0"
1919
chrono = { version = "0.4", default-features = false, features = ["alloc", "std"] }
2020
url = "2.3"
21-
http = "1.0.0"
21+
http = "1.0"
2222

2323
# HTTP client dependencies.
24-
reqwest = { version = "0.12.2", features = ["json"] }
24+
reqwest = { version = "0.12", features = ["json"] }
2525

2626
# WebSocket client dependencies.
27-
tokio = { version = "1.22", features = ["rt", "time", "sync", "macros", "rt-multi-thread"] }
28-
tokio-tungstenite = "0.21.0"
27+
tokio = { version = "1.47", features = ["rt", "time", "sync", "macros", "rt-multi-thread"] }
28+
tokio-tungstenite = { version = "0.27", features = ["url"] }
2929
futures-channel = "0.3"
3030
tokio-stream = "0.1"
3131
tokio-util = "0.7"

relay_client/src/websocket.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pub enum WebsocketClientError {
6363
/// Wrapper around the websocket [`CloseFrame`] providing info about the
6464
/// connection closing reason.
6565
#[derive(Debug, Clone)]
66-
pub struct CloseReason(pub Option<CloseFrame<'static>>);
66+
pub struct CloseReason(pub Option<CloseFrame>);
6767

6868
impl std::fmt::Display for CloseReason {
6969
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
@@ -117,7 +117,7 @@ pub trait ConnectionHandler: Send + 'static {
117117
fn connected(&mut self) {}
118118

119119
/// Called when the Relay connection is closed.
120-
fn disconnected(&mut self, _frame: Option<CloseFrame<'static>>) {}
120+
fn disconnected(&mut self, _frame: Option<CloseFrame>) {}
121121

122122
/// Called when a message is received from the Relay.
123123
fn message_received(&mut self, message: PublishedMessage);

relay_client/src/websocket/inbound.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ where
5757

5858
let message = Message::Text(
5959
serde_json::to_string(&Payload::Response(response))
60+
.map(Into::into)
6061
.map_err(ClientError::Serialization)?,
6162
);
6263

relay_client/src/websocket/stream.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub enum StreamEvent {
6868
/// The websocket connection was closed.
6969
///
7070
/// This is the last event that can be produced by the stream.
71-
ConnectionClosed(Option<CloseFrame<'static>>),
71+
ConnectionClosed(Option<CloseFrame>),
7272
}
7373

7474
/// Lower-level [`FusedStream`] interface for the client connection.
@@ -84,7 +84,7 @@ pub struct ClientStream {
8484
outbound_rx: UnboundedReceiver<Message>,
8585
requests: HashMap<MessageId, oneshot::Sender<Result<serde_json::Value, ClientError>>>,
8686
id_generator: MessageIdGenerator,
87-
close_frame: Option<CloseFrame<'static>>,
87+
close_frame: Option<CloseFrame>,
8888
}
8989

9090
impl ClientStream {
@@ -119,7 +119,7 @@ impl ClientStream {
119119

120120
Entry::Vacant(entry) => {
121121
entry.insert(tx);
122-
self.outbound_tx.send(Message::Text(data)).ok();
122+
self.outbound_tx.send(Message::Text(data.into())).ok();
123123
}
124124
},
125125

@@ -141,7 +141,7 @@ impl ClientStream {
141141
}
142142

143143
/// Closes the connection.
144-
pub async fn close(&mut self, frame: Option<CloseFrame<'static>>) -> Result<(), ClientError> {
144+
pub async fn close(&mut self, frame: Option<CloseFrame>) -> Result<(), ClientError> {
145145
self.close_frame = frame.clone();
146146
self.socket
147147
.close(frame)

relay_rpc/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ serde = { version = "1.0", features = ["derive", "rc"] }
2121
serde-aux = { version = "4.1", default-features = false }
2222
serde_json = "1.0"
2323
thiserror = "1.0"
24-
ed25519-dalek = { version = "2.1.1", features = ["rand_core"] }
24+
ed25519-dalek = { version = "2.1", features = ["rand_core"] }
2525
rand = "0.8"
2626
chrono = { version = "0.4", default-features = false, features = [
2727
"std",
@@ -32,9 +32,9 @@ once_cell = "1.16"
3232
jsonwebtoken = "8.1"
3333
k256 = { version = "0.13", optional = true }
3434
sha3 = { version = "0.10", optional = true }
35-
sha2 = { version = "0.10.6" }
35+
sha2 = "0.10"
3636
url = "2"
37-
alloy = { version = "0.3.6", optional = true, features = [
37+
alloy = { version = "0.3", optional = true, features = [
3838
"json-rpc",
3939
"provider-http",
4040
"contract",
@@ -43,12 +43,12 @@ alloy = { version = "0.3.6", optional = true, features = [
4343
strum = { version = "0.26", features = ["strum_macros", "derive"] }
4444

4545
[dev-dependencies]
46-
tokio = { version = "1.35.1", features = ["test-util", "macros"] }
47-
alloy = { version = "0.3.6", features = ["node-bindings"] }
46+
tokio = { version = "1.47", features = ["test-util", "macros"] }
47+
alloy = { version = "0.3", features = ["node-bindings"] }
4848

4949
[build-dependencies]
5050
serde_json = "1.0"
51-
hex = "0.4.3"
51+
hex = "0.4"
5252

5353
[lints.clippy]
5454
indexing_slicing = "deny"

0 commit comments

Comments
 (0)