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

Update to axum-0.7/hyper-1.2 #436

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

RaoulHC
Copy link
Contributor

@RaoulHC RaoulHC commented Mar 24, 2024

Hyper (and by extension axum) removed the Server struct on 1.0, this largely keeps the same API but uses axum::serve under the hood. However bind is now an async function, and the errors are slightly different.

Closes #397.

Hyper (and by extension axum) remove the `Server` struct on 1.0, this
keeps the same API but uses axum::serve under the hood, with a slight
change to the Error type returned.
@RaoulHC
Copy link
Contributor Author

RaoulHC commented Mar 24, 2024

Realised that actually the bind can be made non-async, as the TcpListener can be converted back and forth, so this keeps the API pretty much identical.

@RaoulHC
Copy link
Contributor Author

RaoulHC commented Mar 24, 2024

@johanhelsing that dead code warning seems unrelated to this change, should the field be made public or have an accessor? It looks like it's meant to be there for debugging

Copy link
Owner

@johanhelsing johanhelsing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johanhelsing that dead code warning seems unrelated to this change, should the field be made public or have an accessor? It looks like it's meant to be there for debugging

Yes, seems unrelated, opened #437

Thanks for fixing this, looks great to me!

@johanhelsing johanhelsing merged commit d7b6ab0 into johanhelsing:main Mar 25, 2024
8 of 12 checks passed
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 this pull request may close these issues.

Upgrade to axum 0.7
2 participants