You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is the error when using Hyper 1.0.0, I have also tried 1.1.0 with the same results:
error[E0277]: the trait bound `fn(std::option::Option<Query<Pagination>>, axum::extract::State<Arc<std::sync::Mutex<TagDictionary>>>) -> impl futures_util::Future<Output = Result<impl IntoResponse, hyper::StatusCode>> {adv::tags::get_tags}: Handler<_, _, _>` is not satisfied
--> server/src/http_server/routes/api/v1/adv/tags/mod.rs:22:25
|
22 | .route("/", get(get_tags))
| --- ^^^^^^^^ the trait `Handler<_, _, _>` is not implemented for fn item `fn(Option<Query<Pagination>>, State<Arc<Mutex<TagDictionary>>>) -> impl Future<Output = ...> {get_tags}`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `Handler<T, S, B>`:
<Layered<L, H, T, S, B, B2> as Handler<T, S, B2>>
<MethodRouter<S, B> as Handler<(), S, B>>
note: required by a bound in `axum::routing::get`
--> /home/niels/.cargo/registry/src/index.crates.io-6f17d22bba15001f/axum-0.6.18/src/routing/method_routing.rs:403:1
|
403 | top_level_handler_fn!(get, GET);
| ^^^^^^^^^^^^^^^^^^^^^^---^^^^^^
| | |
| | required by a bound in this function
| required by this bound in `get`
= note: this error originates in the macro `top_level_handler_fn` (in Nightly builds, run with -Z macro-backtrace for more info)
I tried this code:
Here is my code (it is simplified to just cause the issue to happen once):
Bug Report
Version
Platform
Linux DESKTOP-GU276AE 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Crates
│ ├── hyper v1.1.0
Description
Short summary of the bug
I get a breaking error when upgrading from Hyper 0.14 to 1.X. I have followed the Hyper upgrade recommendations found here: https://hyper.rs/guides/1/upgrading/#:~:text=Prepare%20with%20Backports%20and%20Deprecations.%20Before%20upgrading%2C,enabling%20the%20backports%20and%20deprecated%20features%20of
Error message
Here is the error when using Hyper 1.0.0, I have also tried 1.1.0 with the same results:
I tried this code:
Here is my code (it is simplified to just cause the issue to happen once):
Here is the function that is called:
I have tried asking GitHub Copilot, but there is nothing that seems to make sense.
I have posted the question on Discord as well, but prefer this as the response channel.
This works (but it is not what I would like)
The issue disappears when using Hyper 0.14.28
What am I doing wrong?
Thanks in advance,
Niels
The text was updated successfully, but these errors were encountered: