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

Fix confusing usage of TokioTimer in hello.rs example #3658

Merged
merged 2 commits into from
May 10, 2024

Conversation

krakow10
Copy link
Contributor

@krakow10 krakow10 commented May 5, 2024

The usage of TokioTimer in the example differs from how it would be used with the hyper-util crate. When you try to use the code like you see in the example, it says the type is private, but it is clearly public in the source code of hyper-util. After coming back to this months later, it seems that in hyper-util itself, the usage of #[non_exhaustive] makes the type unconstructable outside the crate, which necessitates using the ::new() method.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@dswij dswij merged commit e77cefe into hyperium:master May 10, 2024
22 checks passed
@krakow10 krakow10 deleted the fix-hello branch May 10, 2024 04:58
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.

None yet

3 participants