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

not compatible with axum 0.6.0-rc.2 #724

Closed
lishubing opened this issue Sep 21, 2022 · 5 comments
Closed

not compatible with axum 0.6.0-rc.2 #724

lishubing opened this issue Sep 21, 2022 · 5 comments

Comments

@lishubing
Copy link

simply run tests in askama_axum:

error[E0277]: the trait bound `fn() -> impl Future<Output = HelloTemplate<'static>> {hello}: Handler<_, _, _>` is not satisfied
   --> askama_axum/tests/basic.rs:22:44
    |
22  |     let app = Router::new().route("/", get(hello));
    |                                        --- ^^^^^ the trait `Handler<_, _, _>` is not implemented for `fn() -> impl Future<Output = HelloTemplate<'static>> {hello}`
    |                                        |
    |                                        required by a bound introduced by this call
    |
    = help: the trait `Handler<T, S, B>` is implemented for `Layered<L, H, T, S, B>`
note: required by a bound in `axum::routing::get`
   --> /.cargo/registry/src/github.com-1ecc6299db9ec823/axum-0.6.0-rc.2/src/routing/method_routing.rs:400:1
    |
400 | top_level_handler_fn!(get, GET);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `axum::routing::get`
    = note: this error originates in the macro `top_level_handler_fn` (in Nightly builds, run with -Z macro-backtrace for more info)


dependency:

[dev-dependencies]
axum = { version = "0.6.0-rc.2", default-features = false }
@djc
Copy link
Owner

djc commented Sep 21, 2022

The main branch is using axum 0.5. Are you referring to #723? If so, please comment there.

@Kijewski
Copy link
Collaborator

I think @lishubing might be referring to

@djc
Copy link
Owner

djc commented Sep 21, 2022

Sorry, yes, that's the one I meant.

@lishubing
Copy link
Author

Oh, I see, that's my fault. I didn't check the dependency of axum-core.

@lishubing
Copy link
Author

I'll just close this issue.

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

No branches or pull requests

3 participants