1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 00:21:08 +01:00

actors: Minimize futures dependencies

This commit is contained in:
Yuki Okushi 2020-05-18 11:46:02 +09:00
parent ab4d8704f1
commit fc8e07b947
No known key found for this signature in database
GPG Key ID: B0986C85C0E2DAA1
4 changed files with 10 additions and 6 deletions

View File

@ -21,9 +21,11 @@ actix-web = "3.0.0-alpha.2"
actix-http = "2.0.0-alpha.3"
actix-codec = "0.2.0"
bytes = "0.5.2"
futures = "0.3.1"
futures-channel = { version = "0.3.5", default-features = false }
futures-core = { version = "0.3.5", default-features = false }
pin-project = "0.4.6"
[dev-dependencies]
actix-rt = "1.0.0"
env_logger = "0.7"
futures-util = { version = "0.3.5", default-features = false }

View File

@ -1,4 +1,5 @@
use std::collections::VecDeque;
use std::future::Future;
use std::pin::Pin;
use std::task::{Context, Poll};
@ -11,8 +12,8 @@ use actix::{
};
use actix_web::error::Error;
use bytes::Bytes;
use futures::channel::oneshot::Sender;
use futures::{Future, Stream};
use futures_channel::oneshot::Sender;
use futures_core::Stream;
/// Execution context for http actors
pub struct HttpContext<A>

View File

@ -1,5 +1,6 @@
//! Websocket integration
use std::collections::VecDeque;
use std::future::Future;
use std::io;
use std::pin::Pin;
use std::task::{Context, Poll};
@ -23,8 +24,8 @@ use actix_web::error::{Error, PayloadError};
use actix_web::http::{header, Method, StatusCode};
use actix_web::{HttpRequest, HttpResponse};
use bytes::{Bytes, BytesMut};
use futures::channel::oneshot::Sender;
use futures::{Future, Stream};
use futures_channel::oneshot::Sender;
use futures_core::Stream;
/// Do websocket handshake and start ws actor.
pub fn start<A, T>(actor: A, req: &HttpRequest, stream: T) -> Result<HttpResponse, Error>

View File

@ -2,7 +2,7 @@ use actix::prelude::*;
use actix_web::{test, web, App, HttpRequest};
use actix_web_actors::*;
use bytes::Bytes;
use futures::{SinkExt, StreamExt};
use futures_util::{SinkExt, StreamExt};
struct Ws;