Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix docs for UdpSocket::send #671

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

Merged
k-nasa merged 3 commits into async-rs:master from Noah-Kennedy:udp-socket-send-doc
Jan 15, 2020

Conversation

Copy link
Contributor

@Noah-Kennedy Noah-Kennedy commented Jan 13, 2020
edited
Loading

Minor change to alter documentation for send to no longer duplicate the documentation for send_to.
Fixes #652.

Copy link
Contributor

@spacekookie spacekookie left a comment

Choose a reason for hiding this comment

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

I think this is a good example.

I've actually been thinking about this myself, because some of the udp module examples were a bit unpolished. It's propably a good approach to create a more complete example in the module docs, then have each function doc only highlight how that function is actually useful, instead of trying to do half in either examples.

@k-nasa k-nasa added the documentation Improvements or additions to documentation label Jan 14, 2020
///
/// let mut buf = vec![0; 1024];
/// let n = socket.recv(&mut buf).await?;
Copy link
Member

Choose a reason for hiding this comment

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

Why remove recv call?
Is this an example of the recv function?

Copy link
Contributor Author

@Noah-Kennedy Noah-Kennedy Jan 14, 2020

Choose a reason for hiding this comment

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

Good catch. It looks like I put the docs in the wrong spot. I'll correct that issue right now

Copy link
Contributor Author

@Noah-Kennedy Noah-Kennedy Jan 14, 2020

Choose a reason for hiding this comment

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

Fixed it

k-nasa reacted with thumbs up emoji
Copy link
Contributor

spacekookie commented Jan 14, 2020 via email

- /// let mut buf = vec![0; 1024]; - /// let n = socket.recv(&mut buf).await?; Why remove `recv` call? Is this an example of the `recv` function?
If its not, it should be

Copy link
Contributor Author

@Noah-Kennedy Noah-Kennedy left a comment

Choose a reason for hiding this comment

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

  • /// let mut buf = vec![0; 1024]; - /// let n = socket.recv(&mut buf).await?; Why remove recv call? Is this an example of the recv function?
    If its not, it should be

Error on my part. Should be fixed now

@k-nasa k-nasa changed the title (削除) Fixes https://github.com/async-rs/async-std/issues/652 (削除ここまで) (追記) Fix docs for UdpSocket::send (追記ここまで) Jan 15, 2020
Copy link
Member

@k-nasa k-nasa left a comment

Choose a reason for hiding this comment

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

LGTM!!

@Noah-Kennedy Thanks 😄

@k-nasa k-nasa merged commit 1071e82 into async-rs:master Jan 15, 2020
@Noah-Kennedy Noah-Kennedy deleted the udp-socket-send-doc branch January 15, 2020 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@k-nasa k-nasa k-nasa approved these changes

+1 more reviewer

@spacekookie spacekookie spacekookie left review comments

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
documentation Improvements or additions to documentation
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

docs for UdpSocket::send have same example as send_to

AltStyle によって変換されたページ (->オリジナル) /