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"
|
edition = "2018"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
default = ["call-all"]
|
||||||
call-all = ["futures-util"]
|
call-all = ["futures-util"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
@ -37,5 +38,4 @@ futures-util = { version = "0.3", optional = true, default-features = false, fea
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tokio-test = "0.2"
|
tokio-test = "0.2"
|
||||||
tokio = { version = "0.2", features = ["stream", "sync", "macros"] }
|
tokio = { version = "0.2", features = ["stream", "sync", "macros"] }
|
||||||
tower = { version = "0.3", path = "../tower" }
|
|
||||||
tower-test = { version = "0.3", path = "../tower-test" }
|
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::future::{ready, Ready};
|
||||||
/// use futures_util::StreamExt;
|
/// use futures_util::StreamExt;
|
||||||
/// use tower_service::Service;
|
/// use tower_service::Service;
|
||||||
/// use tower::ServiceExt;
|
/// use tower_util::ServiceExt;
|
||||||
/// use tokio::prelude::*;
|
/// use tokio::prelude::*;
|
||||||
///
|
///
|
||||||
/// // First, we need to have a Service to process our requests.
|
/// // First, we need to have a Service to process our requests.
|
||||||
|
|
|
@ -30,7 +30,8 @@ pub use crate::{
|
||||||
#[cfg(feature = "call-all")]
|
#[cfg(feature = "call-all")]
|
||||||
pub use crate::call_all::{CallAll, CallAllUnordered};
|
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 {
|
pub mod error {
|
||||||
//! Error types
|
//! Error types
|
||||||
|
|
|
@ -6,9 +6,9 @@ use futures_util::{
|
||||||
use std::task::{Context, Poll};
|
use std::task::{Context, Poll};
|
||||||
use std::{cell::Cell, rc::Rc};
|
use std::{cell::Cell, rc::Rc};
|
||||||
use tokio_test::{assert_pending, assert_ready, task};
|
use tokio_test::{assert_pending, assert_ready, task};
|
||||||
use tower::ServiceExt;
|
|
||||||
use tower_service::*;
|
use tower_service::*;
|
||||||
use tower_test::{assert_request_eq, mock};
|
use tower_test::{assert_request_eq, mock};
|
||||||
|
use tower_util::ServiceExt;
|
||||||
|
|
||||||
type Error = Box<dyn std::error::Error + Send + Sync>;
|
type Error = Box<dyn std::error::Error + Send + Sync>;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue