Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore updated dependencies #2

Merged
merged 1 commit into from
Jan 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ homepage = "https://github.com/polachok/awc-uds/"
documentation = "https://docs.rs/awc-uds"

[dependencies]
actix-tls = "3.0.0-beta.8"
actix-service = "2.0.1"
awc = { version = "3.0.0-beta.9", default-features = false }
actix-tls = "3.0.2"
actix-service = "2.0.2"
actix-rt = "2.2"
awc = { version = "3.0.0-beta.19", default-features = false }


[dev-dependencies]
actix-web = "4.0.0-beta.9"
tempfile = "3.2"
actix-web = "4.0.0-beta.21"
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//!
//!
//! Usage:
//! ```no_run
//! ```no_run compile_fail
//! use awc::{ClientBuilder, Connector};
//! use awc_uds::UdsConnector;
//!
Expand All @@ -14,7 +14,7 @@

use actix_rt::net::UnixStream;
use actix_service::Service;
use actix_tls::connect::{Connect, ConnectError, Connection};
use actix_tls::connect::{ConnectError, ConnectInfo, Connection};
use awc::http::Uri;
use std::future::Future;
use std::path::{Path, PathBuf};
Expand All @@ -32,7 +32,7 @@ impl UdsConnector {
}
}

impl Service<Connect<Uri>> for UdsConnector {
impl Service<ConnectInfo<Uri>> for UdsConnector {
type Response = Connection<Uri, UnixStream>;
type Error = ConnectError;
type Future = Fut<Self::Response, Self::Error>;
Expand All @@ -41,12 +41,12 @@ impl Service<Connect<Uri>> for UdsConnector {
Poll::Ready(Ok(()))
}

fn call(&self, req: Connect<Uri>) -> Self::Future {
fn call(&self, req: ConnectInfo<Uri>) -> Self::Future {
let uri = req.request().clone();
let path = self.0.clone();
let fut = async {
let stream = UnixStream::connect(path).await.map_err(ConnectError::Io)?;
Ok(Connection::new(stream, uri))
Ok(Connection::new(uri, stream))
};
Box::pin(fut)
}
Expand Down