Add clones to combinators

This commit is contained in:
Harry Barber 2020-11-05 19:07:52 +00:00 committed by Sean McArthur
parent 450fa3d2be
commit 5e1e077448
4 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@ use tower_service::Service;
/// Service returned by the [`map_err`] combinator.
///
/// [`map_err`]: crate::util::ServiceExt::map_err
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct MapErr<S, F> {
inner: S,
f: F,

View File

@ -6,7 +6,7 @@ use tower_service::Service;
/// Service returned by the [`map_ok`] combinator.
///
/// [`map_ok`]: crate::util::ServiceExt::map_ok
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct MapOk<S, F> {
inner: S,
f: F,

View File

@ -6,7 +6,7 @@ use tower_service::Service;
/// Service returned by the [`try_with`] combinator.
///
/// [`try_with`]: crate::util::ServiceExt::try_with
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct TryWith<S, F> {
inner: S,
f: F,

View File

@ -5,7 +5,7 @@ use tower_service::Service;
/// Service returned by the [`with`] combinator.
///
/// [`with`]: crate::util::ServiceExt::with
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct With<S, F> {
inner: S,
f: F,