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 TcpStream::peek #773

Merged
merged 2 commits into from Dec 14, 2017

Conversation

Projects
None yet
2 participants
@seanmonstar
Copy link
Contributor

seanmonstar commented Dec 13, 2017

No description provided.

@carllerche
Copy link
Owner

carllerche left a comment

LGTM, just one inline request.

pub fn peek(&self, buf: &mut [u8]) -> io::Result<usize> {
let mut me = self.inner();

match me.read {

This comment has been minimized.

@carllerche

carllerche Dec 13, 2017

Owner

It looks like this block is copied verbatim from readv? Would you mind extracting this to a before_read fn or something like that?

This comment has been minimized.

@seanmonstar

seanmonstar Dec 13, 2017

Author Contributor

Done.

@seanmonstar seanmonstar force-pushed the seanmonstar:peek branch from 044a505 to 9175b83 Dec 13, 2017

@seanmonstar

This comment has been minimized.

Copy link
Contributor Author

seanmonstar commented Dec 13, 2017

Ah, so this requires a newer version of Rust than what is being tested on Travis. Breaking change needing 0.7, or just Deal With It?

@seanmonstar seanmonstar force-pushed the seanmonstar:peek branch from 9175b83 to b5ac91d Dec 13, 2017

@seanmonstar

This comment has been minimized.

Copy link
Contributor Author

seanmonstar commented Dec 14, 2017

CI passed!

@carllerche carllerche merged commit ed3d66a into carllerche:master Dec 14, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.