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

Added get_mut, get_ref and into_inner for Lines. #2450

Merged
merged 2 commits into from
Apr 30, 2020
Merged

Added get_mut, get_ref and into_inner for Lines. #2450

merged 2 commits into from
Apr 30, 2020

Conversation

hbina
Copy link
Contributor

@hbina hbina commented Apr 27, 2020

Related issue #2433

Motivation

Provides a convenient method to obtain the underlying reader of Lines.

Solution

Implemented get_mut, get_ref and into_inner. I simply took the implementation from other similar stuffs I see in the code base. Let me know if these are wrong.

@Darksonn Darksonn added A-tokio Area: The main tokio crate C-enhancement Category: A PR with an enhancement or bugfix. M-io Module: tokio/io S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 28, 2020
@Darksonn Darksonn requested a review from LucioFranco April 28, 2020 10:10
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

The implementation seems correct. I had some notes on the documentation.

tokio/src/io/util/lines.rs Outdated Show resolved Hide resolved
tokio/src/io/util/lines.rs Outdated Show resolved Hide resolved
tokio/src/io/util/lines.rs Outdated Show resolved Hide resolved
@hbina
Copy link
Contributor Author

hbina commented Apr 29, 2020

Thank you for the suggestions @hawkw . Applying it now.

@Darksonn Darksonn requested a review from hawkw April 29, 2020 08:55
@Darksonn Darksonn marked this pull request as ready for review April 29, 2020 10:00
@Darksonn Darksonn merged commit 7a89d66 into tokio-rs:master Apr 30, 2020
@Darksonn Darksonn removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 30, 2020
@hbina hbina deleted the issue_2433 branch May 1, 2020 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-enhancement Category: A PR with an enhancement or bugfix. M-io Module: tokio/io
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants