Breaking error when upgrading Hyper from 0.14.X to 1.X.X #2618
-
Bug ReportVersion
PlatformLinux 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 DescriptionShort summary of the bugI 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 messageHere 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, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Can you please share the full dependency table from |
Beta Was this translation helpful? Give feedback.
-
@jplatte - Thank you for the fast response. It looks like I have some issues related to Cargo.toml. I specified this:
and ended up with this
I accidentally gave you the dependencies of another project earlier. When I force Axum to version 0.7.4, then it gives me other errors.
I will look at this later in the week and provide an update. |
Beta Was this translation helpful? Give feedback.
@jplatte - Thank you so much for following up on this.
I realized that I had an issue where I specifically had to state that I wanted "0.7.4", not just "0". Axum loaded a previous version. I think that one of the issues was that I have both a Hyper TCP server and an Axum HTTP server in the same executable.
I had to change the way I bound to the server from: