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:
Oliver Gould 2020-12-28 13:09:05 -08:00 committed by GitHub
parent 4f65e3017b
commit ff85e3ade8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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> {}