mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-23 00:00:15 +02:00
Fix wrong From impl for Resource (#1589)
Really not sure how this got past the tests.
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user