Confusing middleware error message #2062
-
Consider the following snippet:
If you try to compile this Rust gives you this very confusing error:
After a lot of head scratching I figured out that if you explicitly specify the type parameters on the
Rust will instead give you this much more understandable error:
And it is clear that I can fix that just by adding a variable for the unwrapped value:
I'm trying to understand: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It’s an issue in rust. Axum has the same issue for extractors. The problem is not unique to axum |
Beta Was this translation helpful? Give feedback.
It’s an issue in rust. Axum has the same issue for extractors. The problem is not unique to axum