Skip to content

Commit d286d90

Browse files
authored
Upgrade all dependencies where doing so wouldn't cause breaking changes. (#303)
* Upgrade dependencies. Leave `rand` alone due to breaking changes. * Fix a number of lints raised by clippy when running tests.
1 parent ca9c52e commit d286d90

17 files changed

+105
-133
lines changed

Cargo.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,28 @@ members = [
2222

2323

2424
[dependencies]
25-
tokio-rustls = { version = "0.26.1" }
25+
tokio-rustls = { version = "0.26.4" }
2626
rustls-pemfile = "2.2.0"
2727
rabbitmq-stream-protocol = { version = "0.9", path = "protocol" }
28-
tokio = { version = "1.29.1", features = ["full"] }
29-
tokio-util = { version = "0.7.3", features = ["codec"] }
30-
bytes = "1.0.0"
31-
pin-project = { version = "1.0.0" }
32-
tokio-stream = "0.1.11"
33-
futures = "0.3.0"
34-
url = "2.2.2"
28+
tokio = { version = "1.48.0", features = ["full"] }
29+
tokio-util = { version = "0.7.16", features = ["codec"] }
30+
bytes = "1.10.1"
31+
pin-project = { version = "1.1.10" }
32+
tokio-stream = "0.1.17"
33+
futures = "0.3.31"
34+
url = "2.5.7"
3535
tracing = "0.1"
3636
thiserror = "2.0"
37-
async-trait = "0.1.51"
37+
async-trait = "0.1.89"
3838
rand = "0.8"
3939
dashmap = "6.1.0"
4040
murmur3 = "0.5.2"
4141
serde = { version = "1.0", features = ["derive"], optional = true }
4242

4343
[dev-dependencies]
44-
tracing-subscriber = "0.3.1"
45-
fake = { version = "4.2.0", features = ['derive'] }
46-
chrono = "0.4.26"
44+
tracing-subscriber = "0.3.20"
45+
fake = { version = "4.4.0", features = ['derive'] }
46+
chrono = "0.4.42"
4747
serde_json = "1.0"
4848
reqwest = { version = "0.12", features = ["json"] }
4949
serde = { version = "1.0", features = ["derive"] }

benchmark/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ edition = "2021"
88
[dependencies]
99

1010
rabbitmq-stream-client = { path = "../" }
11-
tracing-subscriber = "0.3.1"
11+
tracing-subscriber = "0.3.20"
1212
tracing = "0.1"
13-
tokio = { version = "1.29.1", features = ["full"] }
14-
clap = { version = "4.0.22", features = ["derive"] }
15-
futures = "0.3.0"
16-
async-trait = "0.1.51"
13+
tokio = { version = "1.48.0", features = ["full"] }
14+
clap = { version = "4.5.51", features = ["derive"] }
15+
futures = "0.3.31"
16+
async-trait = "0.1.89"

examples/ha_producer.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl MyHAProducer {
101101
ProducerPublishError::Timeout | ProducerPublishError::Closed => {
102102
Box::pin(self.send_with_confirm(message)).await
103103
}
104-
_ => return Err(e),
104+
_ => Err(e),
105105
},
106106
}
107107
}
@@ -114,14 +114,12 @@ async fn ensure_stream_exists(environment: &Environment, stream: &str) -> Rabbit
114114
.create(stream)
115115
.await;
116116

117-
if let Err(e) = create_response {
118-
if let StreamCreateError::Create { stream, status } = e {
119-
match status {
120-
// we can ignore this error because the stream already exists
121-
ResponseCode::StreamAlreadyExists => {}
122-
err => {
123-
panic!("Error creating stream: {:?} {:?}", stream, err);
124-
}
117+
if let Err(StreamCreateError::Create { stream, status }) = create_response {
118+
match status {
119+
// we can ignore this error because the stream already exists
120+
ResponseCode::StreamAlreadyExists => {}
121+
err => {
122+
panic!("Error creating stream: {:?} {:?}", stream, err);
125123
}
126124
}
127125
}

examples/send_async.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,12 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
3535
.create(stream)
3636
.await;
3737

38-
if let Err(e) = create_response {
39-
if let StreamCreateError::Create { stream, status } = e {
40-
match status {
41-
// we can ignore this error because the stream already exists
42-
ResponseCode::StreamAlreadyExists => {}
43-
err => {
44-
println!("Error creating stream: {:?} {:?}", stream, err);
45-
}
38+
if let Err(StreamCreateError::Create { stream, status }) = create_response {
39+
match status {
40+
// we can ignore this error because the stream already exists
41+
ResponseCode::StreamAlreadyExists => {}
42+
err => {
43+
println!("Error creating stream: {:?} {:?}", stream, err);
4644
}
4745
}
4846
}

examples/send_with_confirm.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
1313
.create(stream)
1414
.await;
1515

16-
if let Err(e) = create_response {
17-
if let StreamCreateError::Create { stream, status } = e {
18-
match status {
19-
// we can ignore this error because the stream already exists
20-
ResponseCode::StreamAlreadyExists => {}
21-
err => {
22-
println!("Error creating stream: {:?} {:?}", stream, err);
23-
}
16+
if let Err(StreamCreateError::Create { stream, status }) = create_response {
17+
match status {
18+
// we can ignore this error because the stream already exists
19+
ResponseCode::StreamAlreadyExists => {}
20+
err => {
21+
println!("Error creating stream: {:?} {:?}", stream, err);
2422
}
2523
}
2624
}

examples/simple-consumer.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
1414
.create(stream)
1515
.await;
1616

17-
if let Err(e) = create_response {
18-
if let StreamCreateError::Create { stream, status } = e {
19-
match status {
20-
// we can ignore this error because the stream already exists
21-
ResponseCode::StreamAlreadyExists => {}
22-
err => {
23-
println!("Error creating stream: {:?} {:?}", stream, err);
24-
}
17+
if let Err(StreamCreateError::Create { stream, status }) = create_response {
18+
match status {
19+
// we can ignore this error because the stream already exists
20+
ResponseCode::StreamAlreadyExists => {}
21+
err => {
22+
println!("Error creating stream: {:?} {:?}", stream, err);
2523
}
2624
}
2725
}

examples/superstreams/receive_super_stream.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,12 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
1717
.create_super_stream(super_stream, 3, None)
1818
.await;
1919

20-
if let Err(e) = create_response {
21-
if let StreamCreateError::Create { stream, status } = e {
22-
match status {
23-
// we can ignore this error because the stream already exists
24-
ResponseCode::StreamAlreadyExists => {}
25-
err => {
26-
println!("Error creating stream: {:?} {:?}", stream, err);
27-
}
20+
if let Err(StreamCreateError::Create { stream, status }) = create_response {
21+
match status {
22+
// we can ignore this error because the stream already exists
23+
ResponseCode::StreamAlreadyExists => {}
24+
err => {
25+
println!("Error creating stream: {:?} {:?}", stream, err);
2826
}
2927
}
3028
}

examples/superstreams/send_super_stream.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,12 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
5252
.create_super_stream(super_stream, 3, None)
5353
.await;
5454

55-
if let Err(e) = create_response {
56-
if let StreamCreateError::Create { stream, status } = e {
57-
match status {
58-
// we can ignore this error because the stream already exists
59-
ResponseCode::StreamAlreadyExists => {}
60-
err => {
61-
println!("Error creating stream: {:?} {:?}", stream, err);
62-
}
55+
if let Err(StreamCreateError::Create { stream, status }) = create_response {
56+
match status {
57+
// we can ignore this error because the stream already exists
58+
ResponseCode::StreamAlreadyExists => {}
59+
err => {
60+
println!("Error creating stream: {:?} {:?}", stream, err);
6361
}
6462
}
6563
}

examples/superstreams/send_super_stream_hash.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,12 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
5454
.create_super_stream(super_stream, 3, None)
5555
.await;
5656

57-
if let Err(e) = create_response {
58-
if let StreamCreateError::Create { stream, status } = e {
59-
match status {
60-
// we can ignore this error because the stream already exists
61-
ResponseCode::StreamAlreadyExists => {}
62-
err => {
63-
println!("Error creating stream: {:?} {:?}", stream, err);
64-
}
57+
if let Err(StreamCreateError::Create { stream, status }) = create_response {
58+
match status {
59+
// we can ignore this error because the stream already exists
60+
ResponseCode::StreamAlreadyExists => {}
61+
err => {
62+
println!("Error creating stream: {:?} {:?}", stream, err);
6563
}
6664
}
6765
}

examples/superstreams/send_super_stream_routing_key.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,12 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
5454
.create_super_stream(super_stream, 3, Some(routing_key))
5555
.await;
5656

57-
if let Err(e) = create_response {
58-
if let StreamCreateError::Create { stream, status } = e {
59-
match status {
60-
// we can ignore this error because the stream already exists
61-
ResponseCode::StreamAlreadyExists => {}
62-
err => {
63-
println!("Error creating stream: {:?} {:?}", stream, err);
64-
}
57+
if let Err(StreamCreateError::Create { stream, status }) = create_response {
58+
match status {
59+
// we can ignore this error because the stream already exists
60+
ResponseCode::StreamAlreadyExists => {}
61+
err => {
62+
println!("Error creating stream: {:?} {:?}", stream, err);
6563
}
6664
}
6765
}

0 commit comments

Comments
 (0)