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

awc: Minimize futures dependencies

This commit is contained in:
Yuki Okushi 2020-05-18 11:46:57 +09:00
parent 24372467d9
commit d7abbff3b0
No known key found for this signature in database
GPG Key ID: B0986C85C0E2DAA1
9 changed files with 12 additions and 11 deletions

View File

@ -42,7 +42,7 @@ actix-rt = "1.0.0"
base64 = "0.11"
bytes = "0.5.3"
derive_more = "0.99.2"
futures-core = "0.3.1"
futures-core = { version = "0.3.5", default-features = false }
log =" 0.4"
mime = "0.3"
percent-encoding = "2.1"
@ -63,6 +63,6 @@ actix-server = "1.0.0"
actix-tls = { version = "2.0.0-alpha.1", features = ["openssl", "rustls"] }
brotli2 = "0.3.2"
flate2 = "1.0.13"
futures = "0.3.1"
futures-util = { version = "0.3.5", default-features = false }
env_logger = "0.7"
webpki = "0.21"

View File

@ -7,7 +7,6 @@
//! An HTTP Client
//!
//! ```rust
//! use futures::future::{lazy, Future};
//! use actix_rt::System;
//! use awc::Client;
//!

View File

@ -156,7 +156,7 @@ impl ClientRequest {
///
/// ```rust
/// fn main() {
/// # actix_rt::System::new("test").block_on(futures::future::lazy(|_| {
/// # actix_rt::System::new("test").block_on(futures_util::future::lazy(|_| {
/// let req = awc::Client::new()
/// .get("http://www.rust-lang.org")
/// .set(awc::http::header::Date::now())

View File

@ -1,11 +1,12 @@
use std::cell::{Ref, RefMut};
use std::fmt;
use std::future::Future;
use std::marker::PhantomData;
use std::pin::Pin;
use std::task::{Context, Poll};
use bytes::{Bytes, BytesMut};
use futures_core::{ready, Future, Stream};
use futures_core::{ready, Stream};
use actix_http::cookie::Cookie;
use actix_http::error::{CookieParseError, PayloadError};

View File

@ -1,3 +1,4 @@
use std::future::Future;
use std::net;
use std::pin::Pin;
use std::rc::Rc;
@ -7,7 +8,7 @@ use std::time::Duration;
use actix_rt::time::{delay_for, Delay};
use bytes::Bytes;
use derive_more::From;
use futures_core::{Future, Stream};
use futures_core::Stream;
use serde::Serialize;
use actix_http::body::{Body, BodyStream};

View File

@ -9,7 +9,7 @@ use bytes::Bytes;
use flate2::read::GzDecoder;
use flate2::write::GzEncoder;
use flate2::Compression;
use futures::future::ok;
use futures_util::future::ok;
use rand::Rng;
use actix_http::HttpService;

View File

@ -7,7 +7,7 @@ use actix_http_test::test_server;
use actix_service::{map_config, pipeline_factory, ServiceFactory};
use actix_web::http::Version;
use actix_web::{dev::AppConfig, web, App, HttpResponse};
use futures::future::ok;
use futures_util::future::ok;
use open_ssl::ssl::{SslAcceptor, SslFiletype, SslMethod, SslVerifyMode};
use rust_tls::ClientConfig;

View File

@ -7,7 +7,7 @@ use actix_http_test::test_server;
use actix_service::{map_config, pipeline_factory, ServiceFactory};
use actix_web::http::Version;
use actix_web::{dev::AppConfig, web, App, HttpResponse};
use futures::future::ok;
use futures_util::future::ok;
use open_ssl::ssl::{SslAcceptor, SslConnector, SslFiletype, SslMethod, SslVerifyMode};
fn ssl_acceptor() -> SslAcceptor {

View File

@ -4,8 +4,8 @@ use actix_codec::Framed;
use actix_http::{body::BodySize, h1, ws, Error, HttpService, Request, Response};
use actix_http_test::test_server;
use bytes::Bytes;
use futures::future::ok;
use futures::{SinkExt, StreamExt};
use futures_util::future::ok;
use futures_util::{SinkExt, StreamExt};
async fn ws_service(req: ws::Frame) -> Result<ws::Message, io::Error> {
match req {