Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Axum example not working #366

Closed
piccell opened this issue Feb 1, 2023 · 1 comment · Fixed by #375
Closed

Axum example not working #366

piccell opened this issue Feb 1, 2023 · 1 comment · Fixed by #375

Comments

@piccell
Copy link

piccell commented Feb 1, 2023

Hi,

I copied/pasted the example for Axum integration with the following dependencies:
[dependencies]
axum = "0.6"
maud = { version = "*", features = ["axum"] }
tokio = { version = "1.0", features = ["full"] }

But I have the following compiling error:
the trait bound fn() -> impl std::future::Future<Output = hello_world::{closure#0}::maud::PreEscaped<std::string::String>> {hello_world}: axum::handler::Handler<_, _, _> is not satisfied
the trait axum::handler::Handler<T, S, B2> is implemented for axum::handler::Layered<L, H, T, S, B, B2>

Should I use a specific version ?

Best regards

@alleyshairu
Copy link

I believe that is because the version of maud on crates isn't updated to the latest commit which has axum 0.6 support. You can directly specify the git url to get the latest changes.

maud = { git= "https://github.com/lambda-fairy/maud", features = ["axum"] }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants