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

add more comments to chat example #1665

Merged
merged 2 commits into from Jan 8, 2023
Merged

Conversation

hmeine
Copy link
Contributor

@hmeine hmeine commented Dec 29, 2022

Motivation

As discussed with Programatik and Ferry on Discord, people have lots of
questions about the chat example, so some more code comments might be
helpful.

Solution

As a new axum user myself (target audience of this example), I just tried to
express what I learned from carefully reading this example and implementing
something similar with slightly more words than before. A particular focus was
on the spawned tasks (hopefully useful for readers not too familiar with async
rust yet).

As discussed with Programatik and Ferry on Discord, people have lots of
questions about the chat example, so some more code comments might be
helpful.
Copy link
Member

@davidpdrsn davidpdrsn left a comment

Choose a reason for hiding this comment

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

Thanks!

A very minor nit but would you change the : at the end of the comments back to either . or just nothing? We don't use that convention anywhere else in axum.

examples/chat/src/main.rs Outdated Show resolved Hide resolved
(Better for consistency with the rest of axum's codebase.)
Copy link
Member

@davidpdrsn davidpdrsn left a comment

Choose a reason for hiding this comment

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

Thanks!

@davidpdrsn davidpdrsn enabled auto-merge (squash) January 8, 2023 15:19
@davidpdrsn davidpdrsn merged commit 7192c59 into tokio-rs:main Jan 8, 2023
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

2 participants