]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/io/net/pipe.rs
rollup merge of #20273: alexcrichton/second-pass-comm
[rust.git] / src / libstd / io / net / pipe.rs
index 68f3a8e1836356bb494a575627309c125b2e2102..daefdd28b306a5c7264154e567ea18ee28e6fccd 100644 (file)
@@ -676,7 +676,7 @@ fn readwrite_timeouts() {
 
         s.set_timeout(Some(20));
         for i in range(0u, 1001) {
-            match s.write(&[0, .. 128 * 1024]) {
+            match s.write(&[0; 128 * 1024]) {
                 Ok(()) | Err(IoError { kind: ShortWrite(..), .. }) => {},
                 Err(IoError { kind: TimedOut, .. }) => break,
                 Err(e) => panic!("{}", e),
@@ -705,7 +705,7 @@ fn read_timeouts() {
             rx.recv().unwrap();
             let mut amt = 0;
             while amt < 100 * 128 * 1024 {
-                match s.read(&mut [0, ..128 * 1024]) {
+                match s.read(&mut [0;128 * 1024]) {
                     Ok(n) => { amt += n; }
                     Err(e) => panic!("{}", e),
                 }
@@ -720,7 +720,7 @@ fn read_timeouts() {
 
         tx.send(()).unwrap();
         for _ in range(0u, 100) {
-            assert!(s.write(&[0, ..128 * 1024]).is_ok());
+            assert!(s.write(&[0;128 * 1024]).is_ok());
         }
     }
 
@@ -739,7 +739,7 @@ fn write_timeouts() {
         let mut s = a.accept().unwrap();
         s.set_write_timeout(Some(20));
         for i in range(0u, 1001) {
-            match s.write(&[0, .. 128 * 1024]) {
+            match s.write(&[0; 128 * 1024]) {
                 Ok(()) | Err(IoError { kind: ShortWrite(..), .. }) => {},
                 Err(IoError { kind: TimedOut, .. }) => break,
                 Err(e) => panic!("{}", e),