code review
This commit is contained in:
parent
849542ca47
commit
89838b3ae1
|
@ -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)>,
|
||||
}
|
||||
|
|
|
@ -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>,
|
||||
{
|
||||
|
|
|
@ -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>;
|
||||
|
|
Loading…
Reference in New Issue