util: Remove dev dep on tower (#401)

* util: Remove dev dep on tower

* Fix rustc bug

* enable call-all by default
This commit is contained in:
Lucio Franco 2019-12-19 18:17:21 -05:00 committed by GitHub
parent d63665515c
commit 7b48479bd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 4 deletions

View File

@ -23,6 +23,7 @@ categories = ["asynchronous", "network-programming"]
edition = "2018"
[features]
default = ["call-all"]
call-all = ["futures-util"]
[dependencies]
@ -37,5 +38,4 @@ futures-util = { version = "0.3", optional = true, default-features = false, fea
[dev-dependencies]
tokio-test = "0.2"
tokio = { version = "0.2", features = ["stream", "sync", "macros"] }
tower = { version = "0.3", path = "../tower" }
tower-test = { version = "0.3", path = "../tower-test" }

View File

@ -23,7 +23,7 @@ use tower_service::Service;
/// use futures_util::future::{ready, Ready};
/// use futures_util::StreamExt;
/// use tower_service::Service;
/// use tower::ServiceExt;
/// use tower_util::ServiceExt;
/// use tokio::prelude::*;
///
/// // First, we need to have a Service to process our requests.

View File

@ -30,7 +30,8 @@ pub use crate::{
#[cfg(feature = "call-all")]
pub use crate::call_all::{CallAll, CallAllUnordered};
type Error = Box<dyn std::error::Error + Send + Sync>;
#[doc(hidden)]
pub type Error = Box<dyn std::error::Error + Send + Sync>;
pub mod error {
//! Error types

View File

@ -6,9 +6,9 @@ use futures_util::{
use std::task::{Context, Poll};
use std::{cell::Cell, rc::Rc};
use tokio_test::{assert_pending, assert_ready, task};
use tower::ServiceExt;
use tower_service::*;
use tower_test::{assert_request_eq, mock};
use tower_util::ServiceExt;
type Error = Box<dyn std::error::Error + Send + Sync>;