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:
parent
ab4d8704f1
commit
fc8e07b947
@ -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 }
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user