about summary refs log tree commit diff
path: root/src/libstd/sys/common
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-06 15:05:53 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-06 15:05:53 -0800
commit1afe8a4fb86fe54be8008b033de166d9c1f8f650 (patch)
treec7f8c61d1f944c6f2b4a1c59979bfa4b0fae3cfa /src/libstd/sys/common
parentea6f65c5f1a3f84e010d2cef02a0160804e9567a (diff)
parent0c7f7a5fb8919c6a382f9acd1e921c51f807f625 (diff)
downloadrust-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.rs2
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() => {}