Replace most ~exprs with 'box'. #11779

This commit is contained in:
Brian Anderson
2014-04-25 01:08:02 -07:00
parent a67307e2a5
commit a5be12ce7e
117 changed files with 630 additions and 623 deletions

View File

@@ -145,7 +145,7 @@ impl rtio::RtioPipe for UnixStream {
}
fn clone(&self) -> ~rtio::RtioPipe:Send {
~UnixStream { inner: self.inner.clone() } as ~rtio::RtioPipe:Send
box UnixStream { inner: self.inner.clone() } as ~rtio::RtioPipe:Send
}
}
@@ -177,7 +177,7 @@ impl UnixListener {
impl rtio::RtioUnixListener for UnixListener {
fn listen(~self) -> IoResult<~rtio::RtioUnixAcceptor:Send> {
self.native_listen(128).map(|a| ~a as ~rtio::RtioUnixAcceptor:Send)
self.native_listen(128).map(|a| box a as ~rtio::RtioUnixAcceptor:Send)
}
}
@@ -210,7 +210,7 @@ impl UnixAcceptor {
impl rtio::RtioUnixAcceptor for UnixAcceptor {
fn accept(&mut self) -> IoResult<~rtio::RtioPipe:Send> {
self.native_accept().map(|s| ~s as ~rtio::RtioPipe:Send)
self.native_accept().map(|s| box s as ~rtio::RtioPipe:Send)
}
fn set_timeout(&mut self, timeout: Option<u64>) {
self.deadline = timeout.map(|a| ::io::timer::now() + a).unwrap_or(0);