mirror of
https://github.com/tokio-rs/axum.git
synced 2024-11-21 22:56:46 +01:00
Remove Copy
some impls (#132)
https://github.com/tokio-rs/axum/pull/129 was a breaking change, in part because I had to remove the `Copy` impl from `OnMethod`. For the sake of future proofing I think we should remove other `Copy` impls from services as well. We can always bring them back once things have matured more. These types no longer implement `Copy`: - `EmptyRouter` - `ExtractorMiddleware` - `ExtractorMiddlewareLayer`
This commit is contained in:
parent
d7d97a613e
commit
a0a19c8362
3 changed files with 4 additions and 7 deletions
|
@ -11,7 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## Breaking changes
|
||||
|
||||
None.
|
||||
- The following types no longer implement `Copy` ([#132](https://github.com/tokio-rs/axum/pull/132)):
|
||||
- `EmptyRouter`
|
||||
- `ExtractorMiddleware`
|
||||
- `ExtractorMiddlewareLayer`
|
||||
|
||||
# 0.1.3 (06. August, 2021)
|
||||
|
||||
|
|
|
@ -98,8 +98,6 @@ impl<E> Clone for ExtractorMiddlewareLayer<E> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<E> Copy for ExtractorMiddlewareLayer<E> {}
|
||||
|
||||
impl<E> fmt::Debug for ExtractorMiddlewareLayer<E> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("ExtractorMiddleware")
|
||||
|
@ -139,8 +137,6 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
impl<S, E> Copy for ExtractorMiddleware<S, E> where S: Copy {}
|
||||
|
||||
impl<S, E> fmt::Debug for ExtractorMiddleware<S, E>
|
||||
where
|
||||
S: fmt::Debug,
|
||||
|
|
|
@ -441,8 +441,6 @@ impl<E> Clone for EmptyRouter<E> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<E> Copy for EmptyRouter<E> {}
|
||||
|
||||
impl<E> fmt::Debug for EmptyRouter<E> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_tuple("EmptyRouter").finish()
|
||||
|
|
Loading…
Reference in a new issue