mirror of
https://github.com/tokio-rs/axum.git
synced 2024-12-29 15:49:16 +01:00
Fix wrong From
impl for Resource
(#1589)
Really not sure how this got past the tests.
This commit is contained in:
parent
87a80ec47b
commit
c7985b7858
2 changed files with 5 additions and 3 deletions
|
@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning].
|
|||
|
||||
# Unreleased
|
||||
|
||||
- None.
|
||||
- **fixed:** Fix wrong `From` impl for `Resource` ([#1589])
|
||||
|
||||
[#1589]: https://github.com/tokio-rs/axum/pull/1589
|
||||
|
||||
# 0.4.0 (25. November, 2022)
|
||||
|
||||
|
|
|
@ -137,8 +137,8 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
impl<B> From<Resource<B>> for Router<B> {
|
||||
fn from(resource: Resource<B>) -> Self {
|
||||
impl<S, B> From<Resource<S, B>> for Router<S, B> {
|
||||
fn from(resource: Resource<S, B>) -> Self {
|
||||
resource.router
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue