code review

This commit is contained in:
Jane Lusby 2020-06-24 13:34:14 -07:00
parent 849542ca47
commit 89838b3ae1
3 changed files with 5 additions and 2 deletions

View File

@ -9,7 +9,7 @@ use tower_service::Service;
/// which means that this layer can only be used on the Tokio runtime.
///
/// See the module documentation for more details.
pub struct BufferLayer<Request, E2> {
pub struct BufferLayer<Request, E2 = crate::BoxError> {
bound: usize,
_p: PhantomData<fn(Request, E2)>,
}

View File

@ -13,7 +13,7 @@ use tower_service::Service;
///
/// See the module documentation for more details.
#[derive(Debug)]
pub struct Buffer<S, Request, E2>
pub struct Buffer<S, Request, E2 = crate::BoxError>
where
S: Service<Request>,
{

View File

@ -81,3 +81,6 @@ pub use tower_service::Service;
mod sealed {
pub trait Sealed<T> {}
}
/// Alias for a type-erased error type.
pub type BoxError = Box<dyn std::error::Error + Send + Sync>;