diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-06 15:05:53 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-06 15:05:53 -0800 |
| commit | 1afe8a4fb86fe54be8008b033de166d9c1f8f650 (patch) | |
| tree | c7f8c61d1f944c6f2b4a1c59979bfa4b0fae3cfa /src/libstd/sys/common | |
| parent | ea6f65c5f1a3f84e010d2cef02a0160804e9567a (diff) | |
| parent | 0c7f7a5fb8919c6a382f9acd1e921c51f807f625 (diff) | |
| download | rust-1afe8a4fb86fe54be8008b033de166d9c1f8f650.tar.gz rust-1afe8a4fb86fe54be8008b033de166d9c1f8f650.zip | |
rollup merge of #20562: nick29581/arrays-3
Diffstat (limited to 'src/libstd/sys/common')
| -rw-r--r-- | src/libstd/sys/common/net.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sys/common/net.rs b/src/libstd/sys/common/net.rs index 4cf891ac498..902942d7244 100644 --- a/src/libstd/sys/common/net.rs +++ b/src/libstd/sys/common/net.rs @@ -469,7 +469,7 @@ pub fn write<T, L, W>(fd: sock_t, // Also as with read(), we use MSG_DONTWAIT to guard ourselves // against unforeseen circumstances. let _guard = lock(); - let ptr = buf[written..].as_ptr(); + let ptr = buf.index(&(written..)).as_ptr(); let len = buf.len() - written; match retry(|| write(deadline.is_some(), ptr, len)) { -1 if wouldblock() => {} |
