]> git.lizzy.rs Git - rust.git/blobdiff - src/librustuv/pipe.rs
Register new snapshots
[rust.git] / src / librustuv / pipe.rs
index e5c134b6b92687b7285f3b88935efd9158bbe104..2ac9bfd202b8e8bcd011af3b1c896a41befbeb38 100644 (file)
@@ -38,8 +38,8 @@ pub struct PipeWatcher {
 pub struct PipeListener {
     home: HomeHandle,
     pipe: *uvll::uv_pipe_t,
-    outgoing: Sender<IoResult<Box<rtio::RtioPipe:Send>>>,
-    incoming: Receiver<IoResult<Box<rtio::RtioPipe:Send>>>,
+    outgoing: Sender<IoResult<Box<rtio::RtioPipe + Send>>>,
+    incoming: Receiver<IoResult<Box<rtio::RtioPipe + Send>>>,
 }
 
 pub struct PipeAcceptor {
@@ -129,7 +129,7 @@ fn write(&mut self, buf: &[u8]) -> IoResult<()> {
         self.stream.write(buf, guard.can_timeout).map_err(uv_error_to_io_error)
     }
 
-    fn clone(&self) -> Box<rtio::RtioPipe:Send> {
+    fn clone(&self) -> Box<rtio::RtioPipe + Send> {
         box PipeWatcher {
             stream: StreamWatcher::new(self.stream.handle),
             defused: false,
@@ -137,7 +137,7 @@ fn clone(&self) -> Box<rtio::RtioPipe:Send> {
             refcount: self.refcount.clone(),
             read_access: self.read_access.clone(),
             write_access: self.write_access.clone(),
-        } as Box<rtio::RtioPipe:Send>
+        } as Box<rtio::RtioPipe + Send>
     }
 
     fn close_read(&mut self) -> IoResult<()> {
@@ -248,7 +248,7 @@ pub fn bind(io: &mut UvIoFactory, name: &CString)
 }
 
 impl rtio::RtioUnixListener for PipeListener {
-    fn listen(~self) -> IoResult<Box<rtio::RtioUnixAcceptor:Send>> {
+    fn listen(~self) -> IoResult<Box<rtio::RtioUnixAcceptor + Send>> {
         // create the acceptor object from ourselves
         let mut acceptor = box PipeAcceptor {
             listener: self,
@@ -258,7 +258,7 @@ fn listen(~self) -> IoResult<Box<rtio::RtioUnixAcceptor:Send>> {
         let _m = acceptor.fire_homing_missile();
         // FIXME: the 128 backlog should be configurable
         match unsafe { uvll::uv_listen(acceptor.listener.pipe, 128, listen_cb) } {
-            0 => Ok(acceptor as Box<rtio::RtioUnixAcceptor:Send>),
+            0 => Ok(acceptor as Box<rtio::RtioUnixAcceptor + Send>),
             n => Err(uv_error_to_io_error(UvError(n))),
         }
     }
@@ -283,7 +283,7 @@ fn uv_handle(&self) -> *uvll::uv_pipe_t { self.pipe }
             });
             let client = PipeWatcher::new_home(&loop_, pipe.home().clone(), false);
             assert_eq!(unsafe { uvll::uv_accept(server, client.handle()) }, 0);
-            Ok(box client as Box<rtio::RtioPipe:Send>)
+            Ok(box client as Box<rtio::RtioPipe + Send>)
         }
         n => Err(uv_error_to_io_error(UvError(n)))
     };
@@ -300,7 +300,7 @@ fn drop(&mut self) {
 // PipeAcceptor implementation and traits
 
 impl rtio::RtioUnixAcceptor for PipeAcceptor {
-    fn accept(&mut self) -> IoResult<Box<rtio::RtioPipe:Send>> {
+    fn accept(&mut self) -> IoResult<Box<rtio::RtioPipe + Send>> {
         self.timeout.accept(&self.listener.incoming)
     }