about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/common/net.rs4
-rw-r--r--src/libstd/sys/unix/fs.rs6
-rw-r--r--src/libstd/sys/unix/helper_signal.rs2
-rw-r--r--src/libstd/sys/unix/pipe.rs6
-rw-r--r--src/libstd/sys/unix/process.rs4
-rw-r--r--src/libstd/sys/unix/tcp.rs6
-rw-r--r--src/libstd/sys/unix/timer.rs2
7 files changed, 15 insertions, 15 deletions
diff --git a/src/libstd/sys/common/net.rs b/src/libstd/sys/common/net.rs
index 7bb3c6b0ec9..fc3a8230c4c 100644
--- a/src/libstd/sys/common/net.rs
+++ b/src/libstd/sys/common/net.rs
@@ -359,7 +359,7 @@ pub fn read<T>(fd: sock_t,
             // With a timeout, first we wait for the socket to become
             // readable using select(), specifying the relevant timeout for
             // our previously set deadline.
-            try!(await([fd], deadline, Readable));
+            try!(await(&[fd], deadline, Readable));
 
             // At this point, we're still within the timeout, and we've
             // determined that the socket is readable (as returned by
@@ -411,7 +411,7 @@ pub fn write<T>(fd: sock_t,
         while written < buf.len() && (write_everything || written == 0) {
             // As with read(), first wait for the socket to be ready for
             // the I/O operation.
-            match await([fd], deadline, Writable) {
+            match await(&[fd], deadline, Writable) {
                 Err(ref e) if e.kind == io::EndOfFile && written > 0 => {
                     assert!(deadline.is_some());
                     return Err(short_write(written, "short write"))
diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs
index 2d02c34e958..816876b5e4a 100644
--- a/src/libstd/sys/unix/fs.rs
+++ b/src/libstd/sys/unix/fs.rs
@@ -376,7 +376,7 @@ mod tests {
 
         writer.write(b"test").ok().unwrap();
         let mut buf = [0u8, ..4];
-        match reader.read(buf) {
+        match reader.read(&mut buf) {
             Ok(4) => {
                 assert_eq!(buf[0], 't' as u8);
                 assert_eq!(buf[1], 'e' as u8);
@@ -386,7 +386,7 @@ mod tests {
             r => panic!("invalid read: {}", r),
         }
 
-        assert!(writer.read(buf).is_err());
-        assert!(reader.write(buf).is_err());
+        assert!(writer.read(&mut buf).is_err());
+        assert!(reader.write(&buf).is_err());
     }
 }
diff --git a/src/libstd/sys/unix/helper_signal.rs b/src/libstd/sys/unix/helper_signal.rs
index a806bea2568..ed9bd0a239f 100644
--- a/src/libstd/sys/unix/helper_signal.rs
+++ b/src/libstd/sys/unix/helper_signal.rs
@@ -21,7 +21,7 @@ pub fn new() -> (signal, signal) {
 }
 
 pub fn signal(fd: libc::c_int) {
-    FileDesc::new(fd, false).write([0]).ok().unwrap();
+    FileDesc::new(fd, false).write(&[0]).ok().unwrap();
 }
 
 pub fn close(fd: libc::c_int) {
diff --git a/src/libstd/sys/unix/pipe.rs b/src/libstd/sys/unix/pipe.rs
index 67384848a94..3fba06e0c7f 100644
--- a/src/libstd/sys/unix/pipe.rs
+++ b/src/libstd/sys/unix/pipe.rs
@@ -281,8 +281,8 @@ impl UnixAcceptor {
                     fd => return Ok(UnixStream::new(Arc::new(Inner::new(fd)))),
                 }
             }
-            try!(await([self.fd(), self.inner.reader.fd()],
-                             deadline, Readable));
+            try!(await(&[self.fd(), self.inner.reader.fd()],
+                       deadline, Readable));
         }
 
         Err(eof())
@@ -295,7 +295,7 @@ impl UnixAcceptor {
     pub fn close_accept(&mut self) -> IoResult<()> {
         self.inner.closed.store(true, atomic::SeqCst);
         let fd = FileDesc::new(self.inner.writer.fd(), false);
-        match fd.write([0]) {
+        match fd.write(&[0]) {
             Ok(..) => Ok(()),
             Err(..) if wouldblock() => Ok(()),
             Err(e) => Err(e),
diff --git a/src/libstd/sys/unix/process.rs b/src/libstd/sys/unix/process.rs
index 0965d98d9b0..d7de841f958 100644
--- a/src/libstd/sys/unix/process.rs
+++ b/src/libstd/sys/unix/process.rs
@@ -107,7 +107,7 @@ impl Process {
                 } else if pid > 0 {
                     drop(output);
                     let mut bytes = [0, ..4];
-                    return match input.read(bytes) {
+                    return match input.read(&mut bytes) {
                         Ok(4) => {
                             let errno = (bytes[0] as i32 << 24) |
                                         (bytes[1] as i32 << 16) |
@@ -160,7 +160,7 @@ impl Process {
                         (errno >>  8) as u8,
                         (errno >>  0) as u8,
                     ];
-                    assert!(output.write(bytes).is_ok());
+                    assert!(output.write(&bytes).is_ok());
                     unsafe { libc::_exit(1) }
                 }
 
diff --git a/src/libstd/sys/unix/tcp.rs b/src/libstd/sys/unix/tcp.rs
index 962475e4177..00643ac0a79 100644
--- a/src/libstd/sys/unix/tcp.rs
+++ b/src/libstd/sys/unix/tcp.rs
@@ -121,8 +121,8 @@ impl TcpAcceptor {
                 -1 => return Err(last_net_error()),
                 fd => return Ok(TcpStream::new(fd as sock_t)),
             }
-            try!(await([self.fd(), self.inner.reader.fd()],
-                             deadline, Readable));
+            try!(await(&[self.fd(), self.inner.reader.fd()],
+                       deadline, Readable));
         }
 
         Err(sys_common::eof())
@@ -139,7 +139,7 @@ impl TcpAcceptor {
     pub fn close_accept(&mut self) -> IoResult<()> {
         self.inner.closed.store(true, atomic::SeqCst);
         let fd = FileDesc::new(self.inner.writer.fd(), false);
-        match fd.write([0]) {
+        match fd.write(&[0]) {
             Ok(..) => Ok(()),
             Err(..) if wouldblock() => Ok(()),
             Err(e) => Err(e),
diff --git a/src/libstd/sys/unix/timer.rs b/src/libstd/sys/unix/timer.rs
index a1e6ac3db7e..184ef3adce1 100644
--- a/src/libstd/sys/unix/timer.rs
+++ b/src/libstd/sys/unix/timer.rs
@@ -193,7 +193,7 @@ fn helper(input: libc::c_int, messages: Receiver<Req>, _: ()) {
 
                 // drain the file descriptor
                 let mut buf = [0];
-                assert_eq!(fd.read(buf).ok().unwrap(), 1);
+                assert_eq!(fd.read(&mut buf).ok().unwrap(), 1);
             }
 
             -1 if os::errno() == libc::EINTR as uint => {}