Fix wrong From impl for Resource (#1589)

Really not sure how this got past the tests.
This commit is contained in:
David Pedersen 2022-11-29 10:35:26 +01:00 committed by GitHub
parent 87a80ec47b
commit c7985b7858
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning].
# Unreleased # 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) # 0.4.0 (25. November, 2022)

View file

@ -137,8 +137,8 @@ where
} }
} }
impl<B> From<Resource<B>> for Router<B> { impl<S, B> From<Resource<S, B>> for Router<S, B> {
fn from(resource: Resource<B>) -> Self { fn from(resource: Resource<S, B>) -> Self {
resource.router resource.router
} }
} }