1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-11-29 21:11:17 +00: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" base64 = "0.11"
bytes = "0.5.3" bytes = "0.5.3"
derive_more = "0.99.2" derive_more = "0.99.2"
futures-core = "0.3.1" futures-core = { version = "0.3.5", default-features = false }
log =" 0.4" log =" 0.4"
mime = "0.3" mime = "0.3"
percent-encoding = "2.1" percent-encoding = "2.1"
@ -63,6 +63,6 @@ actix-server = "1.0.0"
actix-tls = { version = "2.0.0-alpha.1", features = ["openssl", "rustls"] } actix-tls = { version = "2.0.0-alpha.1", features = ["openssl", "rustls"] }
brotli2 = "0.3.2" brotli2 = "0.3.2"
flate2 = "1.0.13" flate2 = "1.0.13"
futures = "0.3.1" futures-util = { version = "0.3.5", default-features = false }
env_logger = "0.7" env_logger = "0.7"
webpki = "0.21" webpki = "0.21"

View file

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

View file

@ -156,7 +156,7 @@ impl ClientRequest {
/// ///
/// ```rust /// ```rust
/// fn main() { /// 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() /// let req = awc::Client::new()
/// .get("http://www.rust-lang.org") /// .get("http://www.rust-lang.org")
/// .set(awc::http::header::Date::now()) /// .set(awc::http::header::Date::now())

View file

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

View file

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

View file

@ -9,7 +9,7 @@ use bytes::Bytes;
use flate2::read::GzDecoder; use flate2::read::GzDecoder;
use flate2::write::GzEncoder; use flate2::write::GzEncoder;
use flate2::Compression; use flate2::Compression;
use futures::future::ok; use futures_util::future::ok;
use rand::Rng; use rand::Rng;
use actix_http::HttpService; 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_service::{map_config, pipeline_factory, ServiceFactory};
use actix_web::http::Version; use actix_web::http::Version;
use actix_web::{dev::AppConfig, web, App, HttpResponse}; 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 open_ssl::ssl::{SslAcceptor, SslFiletype, SslMethod, SslVerifyMode};
use rust_tls::ClientConfig; 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_service::{map_config, pipeline_factory, ServiceFactory};
use actix_web::http::Version; use actix_web::http::Version;
use actix_web::{dev::AppConfig, web, App, HttpResponse}; 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}; use open_ssl::ssl::{SslAcceptor, SslConnector, SslFiletype, SslMethod, SslVerifyMode};
fn ssl_acceptor() -> SslAcceptor { 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::{body::BodySize, h1, ws, Error, HttpService, Request, Response};
use actix_http_test::test_server; use actix_http_test::test_server;
use bytes::Bytes; use bytes::Bytes;
use futures::future::ok; use futures_util::future::ok;
use futures::{SinkExt, StreamExt}; use futures_util::{SinkExt, StreamExt};
async fn ws_service(req: ws::Frame) -> Result<ws::Message, io::Error> { async fn ws_service(req: ws::Frame) -> Result<ws::Message, io::Error> {
match req { match req {