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:
parent
d63665515c
commit
7b48479bd2
|
@ -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" }
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>;
|
||||
|
||||
|
|
Loading…
Reference in New Issue