Unable to use async fn
in FromRequestParts implementation
#2551
-
SummaryAs the async traits feature has been stabilised in rust 1.75, I thought that I would not need the impl<S: Send + Sync> FromRequestParts<S> for Ctx {
type Rejection = Error;
async fn from_request_parts(parts: &mut Parts, _state: &S) -> Result<Self> {
todo!()
}
} I get the following error, when I try to compile the provided code: axum version0.7.1 |
Beta Was this translation helpful? Give feedback.
Answered by
jplatte
Jan 30, 2024
Replies: 1 comment 2 replies
-
This is expected. Switching to native async-fn-in-trait is a breaking change in the library code that will be part of the 0.8.0 release. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
jplatte
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is expected. Switching to native async-fn-in-trait is a breaking change in the library code that will be part of the 0.8.0 release.