mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-24 00:01:11 +01:00
actix-server: Minimize futures-*
dependencies
This commit is contained in:
parent
dd3bec83bf
commit
f5b07053fc
@ -30,7 +30,8 @@ log = "0.4"
|
|||||||
num_cpus = "1.11"
|
num_cpus = "1.11"
|
||||||
mio = "0.6.19"
|
mio = "0.6.19"
|
||||||
net2 = "0.2"
|
net2 = "0.2"
|
||||||
futures = "0.3.1"
|
futures-channel = { version = "0.3.4", default-features = false }
|
||||||
|
futures-util = { version = "0.3.4", default-features = false, features = ["sink"] }
|
||||||
slab = "0.4"
|
slab = "0.4"
|
||||||
|
|
||||||
# unix domain sockets
|
# unix domain sockets
|
||||||
@ -40,4 +41,4 @@ mio-uds = { version = "0.6.7" }
|
|||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bytes = "0.5"
|
bytes = "0.5"
|
||||||
env_logger = "0.7"
|
env_logger = "0.7"
|
||||||
actix-testing = "1.0.0"
|
actix-testing = "1.0.0"
|
||||||
|
@ -6,11 +6,11 @@ use std::{io, mem, net};
|
|||||||
use actix_rt::net::TcpStream;
|
use actix_rt::net::TcpStream;
|
||||||
use actix_rt::time::{delay_until, Instant};
|
use actix_rt::time::{delay_until, Instant};
|
||||||
use actix_rt::{spawn, System};
|
use actix_rt::{spawn, System};
|
||||||
use futures::channel::mpsc::{unbounded, UnboundedReceiver};
|
use futures_channel::mpsc::{unbounded, UnboundedReceiver};
|
||||||
use futures::channel::oneshot;
|
use futures_channel::oneshot;
|
||||||
use futures::future::ready;
|
use futures_util::future::ready;
|
||||||
use futures::stream::FuturesUnordered;
|
use futures_util::stream::FuturesUnordered;
|
||||||
use futures::{ready, Future, FutureExt, Stream, StreamExt};
|
use futures_util::{ready, future::Future, FutureExt, stream::Stream, StreamExt};
|
||||||
use log::{error, info};
|
use log::{error, info};
|
||||||
use net2::TcpBuilder;
|
use net2::TcpBuilder;
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ use std::{fmt, io, net};
|
|||||||
use actix_rt::net::TcpStream;
|
use actix_rt::net::TcpStream;
|
||||||
use actix_service as actix;
|
use actix_service as actix;
|
||||||
use actix_utils::counter::CounterGuard;
|
use actix_utils::counter::CounterGuard;
|
||||||
use futures::future::{ok, Future, FutureExt, LocalBoxFuture};
|
use futures_util::future::{ok, Future, FutureExt, LocalBoxFuture};
|
||||||
use log::error;
|
use log::error;
|
||||||
|
|
||||||
use super::builder::bind_addr;
|
use super::builder::bind_addr;
|
||||||
|
@ -3,9 +3,9 @@ use std::io;
|
|||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
use std::task::{Context, Poll};
|
use std::task::{Context, Poll};
|
||||||
|
|
||||||
use futures::channel::mpsc::UnboundedSender;
|
use futures_channel::mpsc::UnboundedSender;
|
||||||
use futures::channel::oneshot;
|
use futures_channel::oneshot;
|
||||||
use futures::FutureExt;
|
use futures_util::FutureExt;
|
||||||
|
|
||||||
use crate::builder::ServerBuilder;
|
use crate::builder::ServerBuilder;
|
||||||
use crate::signals::Signal;
|
use crate::signals::Signal;
|
||||||
|
@ -6,8 +6,8 @@ use std::time::Duration;
|
|||||||
use actix_rt::spawn;
|
use actix_rt::spawn;
|
||||||
use actix_service::{self as actix, Service, ServiceFactory as ActixServiceFactory};
|
use actix_service::{self as actix, Service, ServiceFactory as ActixServiceFactory};
|
||||||
use actix_utils::counter::CounterGuard;
|
use actix_utils::counter::CounterGuard;
|
||||||
use futures::future::{err, ok, LocalBoxFuture, Ready};
|
use futures_util::future::{err, ok, LocalBoxFuture, Ready};
|
||||||
use futures::{FutureExt, TryFutureExt};
|
use futures_util::{FutureExt, TryFutureExt};
|
||||||
use log::error;
|
use log::error;
|
||||||
|
|
||||||
use super::Token;
|
use super::Token;
|
||||||
|
@ -3,7 +3,7 @@ use std::io;
|
|||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
use std::task::{Context, Poll};
|
use std::task::{Context, Poll};
|
||||||
|
|
||||||
use futures::future::lazy;
|
use futures_util::future::lazy;
|
||||||
|
|
||||||
use crate::server::Server;
|
use crate::server::Server;
|
||||||
|
|
||||||
|
@ -7,10 +7,10 @@ use std::time;
|
|||||||
use actix_rt::time::{delay_until, Delay, Instant};
|
use actix_rt::time::{delay_until, Delay, Instant};
|
||||||
use actix_rt::{spawn, Arbiter};
|
use actix_rt::{spawn, Arbiter};
|
||||||
use actix_utils::counter::Counter;
|
use actix_utils::counter::Counter;
|
||||||
use futures::channel::mpsc::{unbounded, UnboundedReceiver, UnboundedSender};
|
use futures_channel::mpsc::{unbounded, UnboundedReceiver, UnboundedSender};
|
||||||
use futures::channel::oneshot;
|
use futures_channel::oneshot;
|
||||||
use futures::future::{join_all, LocalBoxFuture, MapOk};
|
use futures_util::future::{join_all, LocalBoxFuture, MapOk};
|
||||||
use futures::{Future, FutureExt, Stream, TryFutureExt};
|
use futures_util::{future::Future, FutureExt, stream::Stream, TryFutureExt};
|
||||||
use log::{error, info, trace};
|
use log::{error, info, trace};
|
||||||
|
|
||||||
use crate::accept::AcceptNotify;
|
use crate::accept::AcceptNotify;
|
||||||
|
@ -4,7 +4,7 @@ use std::{net, thread, time};
|
|||||||
|
|
||||||
use actix_server::Server;
|
use actix_server::Server;
|
||||||
use actix_service::fn_service;
|
use actix_service::fn_service;
|
||||||
use futures::future::{lazy, ok};
|
use futures_util::future::{lazy, ok};
|
||||||
use net2::TcpBuilder;
|
use net2::TcpBuilder;
|
||||||
|
|
||||||
fn unused_addr() -> net::SocketAddr {
|
fn unused_addr() -> net::SocketAddr {
|
||||||
@ -71,7 +71,7 @@ fn test_start() {
|
|||||||
use actix_codec::{BytesCodec, Framed};
|
use actix_codec::{BytesCodec, Framed};
|
||||||
use actix_rt::net::TcpStream;
|
use actix_rt::net::TcpStream;
|
||||||
use bytes::Bytes;
|
use bytes::Bytes;
|
||||||
use futures::SinkExt;
|
use futures_util::sink::SinkExt;
|
||||||
use std::io::Read;
|
use std::io::Read;
|
||||||
|
|
||||||
let addr = unused_addr();
|
let addr = unused_addr();
|
||||||
|
Loading…
Reference in New Issue
Block a user