mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-25 06:39:22 +02:00
migrate actix-web to std::future
This commit is contained in:
@ -13,8 +13,7 @@ categories = ["network-programming", "asynchronous",
|
||||
"web-programming::websocket"]
|
||||
license = "MIT/Apache-2.0"
|
||||
edition = "2018"
|
||||
|
||||
# workspace = ".."
|
||||
workspace = ".."
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
features = ["openssl", "fail", "brotli", "flate2-zlib", "secure-cookies"]
|
||||
@ -114,18 +113,3 @@ actix-http-test = { version = "0.3.0-alpha.1", features=["openssl"] }
|
||||
env_logger = "0.6"
|
||||
serde_derive = "1.0"
|
||||
open-ssl = { version="0.10", package="openssl" }
|
||||
|
||||
[patch.crates-io]
|
||||
awc = { path = "../awc" }
|
||||
actix-http = { path = "." }
|
||||
actix-http-test = { path = "../test-server" }
|
||||
|
||||
actix-codec = { path = "../../actix-net/actix-codec" }
|
||||
actix-connect = { path = "../../actix-net/actix-connect" }
|
||||
actix-rt = { path = "../../actix-net/actix-rt" }
|
||||
actix-server = { path = "../../actix-net/actix-server" }
|
||||
actix-server-config = { path = "../../actix-net/actix-server-config" }
|
||||
actix-service = { path = "../../actix-net/actix-service" }
|
||||
actix-testing = { path = "../../actix-net/actix-testing" }
|
||||
actix-threadpool = { path = "../../actix-net/actix-threadpool" }
|
||||
actix-utils = { path = "../../actix-net/actix-utils" }
|
||||
|
@ -172,12 +172,11 @@ where
|
||||
/// Finish service configuration and create *http service* for HTTP/1 protocol.
|
||||
pub fn h1<F, P, B>(self, service: F) -> H1Service<T, P, S, B, X, U>
|
||||
where
|
||||
B: MessageBody + 'static,
|
||||
B: MessageBody,
|
||||
F: IntoServiceFactory<S>,
|
||||
S::Error: Into<Error> + 'static,
|
||||
S::Error: Into<Error>,
|
||||
S::InitError: fmt::Debug,
|
||||
S::Response: Into<Response<B>> + 'static,
|
||||
<S::Service as Service>::Future: 'static,
|
||||
S::Response: Into<Response<B>>,
|
||||
{
|
||||
let cfg = ServiceConfig::new(
|
||||
self.keep_alive,
|
||||
|
@ -51,10 +51,10 @@ impl<T, S, B> Dispatcher<T, S, B>
|
||||
where
|
||||
T: IoStream,
|
||||
S: Service<Request = Request>,
|
||||
S::Error: Into<Error> + 'static,
|
||||
S::Future: 'static,
|
||||
S::Response: Into<Response<B>> + 'static,
|
||||
B: MessageBody + 'static,
|
||||
S::Error: Into<Error>,
|
||||
// S::Future: 'static,
|
||||
S::Response: Into<Response<B>>,
|
||||
B: MessageBody,
|
||||
{
|
||||
pub(crate) fn new(
|
||||
service: CloneableService<S>,
|
||||
@ -176,9 +176,9 @@ enum ServiceResponseState<F, B> {
|
||||
impl<F, I, E, B> ServiceResponse<F, I, E, B>
|
||||
where
|
||||
F: Future<Output = Result<I, E>>,
|
||||
E: Into<Error> + 'static,
|
||||
I: Into<Response<B>> + 'static,
|
||||
B: MessageBody + 'static,
|
||||
E: Into<Error>,
|
||||
I: Into<Response<B>>,
|
||||
B: MessageBody,
|
||||
{
|
||||
fn prepare_response(
|
||||
&self,
|
||||
@ -244,9 +244,9 @@ where
|
||||
impl<F, I, E, B> Future for ServiceResponse<F, I, E, B>
|
||||
where
|
||||
F: Future<Output = Result<I, E>>,
|
||||
E: Into<Error> + 'static,
|
||||
I: Into<Response<B>> + 'static,
|
||||
B: MessageBody + 'static,
|
||||
E: Into<Error>,
|
||||
I: Into<Response<B>>,
|
||||
B: MessageBody,
|
||||
{
|
||||
type Output = ();
|
||||
|
||||
|
Reference in New Issue
Block a user