Skip to content

Commit

Permalink
Fix client connector usage, fixes lifetime constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Jun 23, 2023
1 parent 319207a commit aa96e95
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changes

## [0.8.1] - 2023-06-23

* Fix client connector usage, fixes lifetime constraint

## [0.8.0] - 2023-06-22

* Release v0.8.0
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ntex-amqp"
version = "0.8.0"
version = "0.8.1"
authors = ["ntex contributors <[email protected]>"]
description = "AMQP 1.0 Client/Server framework"
documentation = "https://docs.rs/ntex-amqp"
Expand All @@ -24,7 +24,7 @@ default = []
frame-trace = []

[dependencies]
ntex = "0.7.0"
ntex = "0.7.2"
ntex-amqp-codec = "0.9.0"

bitflags = "1.3"
Expand All @@ -36,7 +36,7 @@ uuid = { version = "1", features = ["v4"] }

[dev-dependencies]
env_logger = "0.10"
ntex = { version = "0.7.0", features = ["tokio"] }
ntex = { version = "0.7.2", features = ["tokio"] }

[patch.crates-io]
ntex-amqp = { path = "." }
Expand Down
12 changes: 10 additions & 2 deletions src/client/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,11 @@ where
}

async fn _connect(&self, address: A) -> Result<Client, ConnectError> {
let io = self.connector.call(Connect::new(address)).await?;
let io = self
.connector
.clone()
.service_call(Connect::new(address))

Check warning on line 170 in src/client/connector.rs

View workflow job for this annotation

GitHub Actions / clippy

use of deprecated method `ntex::Pipeline::<S>::service_call`: Use Pipeline::call() instead

warning: use of deprecated method `ntex::Pipeline::<S>::service_call`: Use Pipeline::call() instead --> src/client/connector.rs:170:14 | 170 | .service_call(Connect::new(address)) | ^^^^^^^^^^^^ | = note: `#[warn(deprecated)]` on by default

Check warning on line 170 in src/client/connector.rs

View workflow job for this annotation

GitHub Actions / stable - x86_64-pc-windows-msvc

use of deprecated method `ntex::Pipeline::<S>::service_call`: Use Pipeline::call() instead
.await?;
let config = self.config.clone();
let pool = self.pool;
let disconnect = self.disconnect_timeout;
Expand Down Expand Up @@ -203,7 +207,11 @@ where
}

async fn _connect_sasl(&self, addr: A, auth: SaslAuth) -> Result<Client, ConnectError> {
let io = self.connector.call(Connect::new(addr)).await?;
let io = self
.connector
.clone()
.service_call(Connect::new(addr))

Check warning on line 213 in src/client/connector.rs

View workflow job for this annotation

GitHub Actions / clippy

use of deprecated method `ntex::Pipeline::<S>::service_call`: Use Pipeline::call() instead

warning: use of deprecated method `ntex::Pipeline::<S>::service_call`: Use Pipeline::call() instead --> src/client/connector.rs:213:14 | 213 | .service_call(Connect::new(addr)) | ^^^^^^^^^^^^

Check warning on line 213 in src/client/connector.rs

View workflow job for this annotation

GitHub Actions / stable - x86_64-pc-windows-msvc

use of deprecated method `ntex::Pipeline::<S>::service_call`: Use Pipeline::call() instead
.await?;
let config = self.config.clone();
let pool = self.pool;
let disconnect = self.disconnect_timeout;
Expand Down

0 comments on commit aa96e95

Please sign in to comment.