mirror of
https://github.com/tower-rs/tower.git
synced 2025-09-28 21:41:16 +00:00
buffer: Add Clone + Copy impls for BufferLayer (#493)
It's generally the case that layers need to be shareable. There's no reason that `BufferLayer` should not implement both `Clone` and `Copy`. This change adds manual `Clone` and `Copy` implementations for `BufferLayer`.
This commit is contained in:
parent
4f65e3017b
commit
ff85e3ade8
@ -58,3 +58,14 @@ impl<Request> fmt::Debug for BufferLayer<Request> {
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl<Request> Clone for BufferLayer<Request> {
|
||||
fn clone(&self) -> Self {
|
||||
Self {
|
||||
bound: self.bound,
|
||||
_p: self._p,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<Request> Copy for BufferLayer<Request> {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user