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

Avoid runtime panics in IoVec on Windows #747

Merged
merged 1 commit into from Oct 16, 2017

Conversation

Projects
None yet
3 participants
@alexcrichton
Copy link
Contributor

alexcrichton commented Oct 14, 2017

Closes #746

@@ -246,7 +246,11 @@ impl TcpStream {
}

pub fn read(&self, buf: &mut [u8]) -> io::Result<usize> {
self.readv(&mut [buf.into()])
if buf.len() > 0 {
self.readv(&mut [buf.into()])

This comment has been minimized.

@jolhoeft

jolhoeft Oct 14, 2017

Would it be better to IoVec::from_bytes_mut here? And in the write method below?

This comment has been minimized.

@alexcrichton

alexcrichton Oct 15, 2017

Author Contributor

Indeed!

@alexcrichton alexcrichton force-pushed the alexcrichton:iovec-panic branch from 02f08fd to 05cca34 Oct 15, 2017

@alexcrichton alexcrichton force-pushed the alexcrichton:iovec-panic branch from 05cca34 to c394a13 Oct 15, 2017

@carllerche carllerche merged commit ad9911f into carllerche:master Oct 16, 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.