Fix fallout of removing default bounds
This is all purely fallout of getting the previous commit to compile.
This commit is contained in:
parent
bdd24b2a56
commit
bb9172d7b5
61 changed files with 378 additions and 364 deletions
|
|
@ -176,8 +176,8 @@ impl rtio::RtioPipe for FileDesc {
|
|||
fn write(&mut self, buf: &[u8]) -> Result<(), IoError> {
|
||||
self.inner_write(buf)
|
||||
}
|
||||
fn clone(&self) -> ~rtio::RtioPipe {
|
||||
~FileDesc { inner: self.inner.clone() } as ~rtio::RtioPipe
|
||||
fn clone(&self) -> ~rtio::RtioPipe:Send {
|
||||
~FileDesc { inner: self.inner.clone() } as ~rtio::RtioPipe:Send
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -227,20 +227,20 @@ impl IoFactory {
|
|||
|
||||
impl rtio::IoFactory for IoFactory {
|
||||
// networking
|
||||
fn tcp_connect(&mut self, addr: SocketAddr) -> IoResult<~RtioTcpStream> {
|
||||
net::TcpStream::connect(addr).map(|s| ~s as ~RtioTcpStream)
|
||||
fn tcp_connect(&mut self, addr: SocketAddr) -> IoResult<~RtioTcpStream:Send> {
|
||||
net::TcpStream::connect(addr).map(|s| ~s as ~RtioTcpStream:Send)
|
||||
}
|
||||
fn tcp_bind(&mut self, addr: SocketAddr) -> IoResult<~RtioTcpListener> {
|
||||
net::TcpListener::bind(addr).map(|s| ~s as ~RtioTcpListener)
|
||||
fn tcp_bind(&mut self, addr: SocketAddr) -> IoResult<~RtioTcpListener:Send> {
|
||||
net::TcpListener::bind(addr).map(|s| ~s as ~RtioTcpListener:Send)
|
||||
}
|
||||
fn udp_bind(&mut self, addr: SocketAddr) -> IoResult<~RtioUdpSocket> {
|
||||
net::UdpSocket::bind(addr).map(|u| ~u as ~RtioUdpSocket)
|
||||
fn udp_bind(&mut self, addr: SocketAddr) -> IoResult<~RtioUdpSocket:Send> {
|
||||
net::UdpSocket::bind(addr).map(|u| ~u as ~RtioUdpSocket:Send)
|
||||
}
|
||||
fn unix_bind(&mut self, path: &CString) -> IoResult<~RtioUnixListener> {
|
||||
pipe::UnixListener::bind(path).map(|s| ~s as ~RtioUnixListener)
|
||||
fn unix_bind(&mut self, path: &CString) -> IoResult<~RtioUnixListener:Send> {
|
||||
pipe::UnixListener::bind(path).map(|s| ~s as ~RtioUnixListener:Send)
|
||||
}
|
||||
fn unix_connect(&mut self, path: &CString) -> IoResult<~RtioPipe> {
|
||||
pipe::UnixStream::connect(path).map(|s| ~s as ~RtioPipe)
|
||||
fn unix_connect(&mut self, path: &CString) -> IoResult<~RtioPipe:Send> {
|
||||
pipe::UnixStream::connect(path).map(|s| ~s as ~RtioPipe:Send)
|
||||
}
|
||||
fn get_host_addresses(&mut self, host: Option<&str>, servname: Option<&str>,
|
||||
hint: Option<ai::Hint>) -> IoResult<~[ai::Info]> {
|
||||
|
|
@ -249,16 +249,16 @@ impl rtio::IoFactory for IoFactory {
|
|||
|
||||
// filesystem operations
|
||||
fn fs_from_raw_fd(&mut self, fd: c_int,
|
||||
close: CloseBehavior) -> ~RtioFileStream {
|
||||
close: CloseBehavior) -> ~RtioFileStream:Send {
|
||||
let close = match close {
|
||||
rtio::CloseSynchronously | rtio::CloseAsynchronously => true,
|
||||
rtio::DontClose => false
|
||||
};
|
||||
~file::FileDesc::new(fd, close) as ~RtioFileStream
|
||||
~file::FileDesc::new(fd, close) as ~RtioFileStream:Send
|
||||
}
|
||||
fn fs_open(&mut self, path: &CString, fm: io::FileMode, fa: io::FileAccess)
|
||||
-> IoResult<~RtioFileStream> {
|
||||
file::open(path, fm, fa).map(|fd| ~fd as ~RtioFileStream)
|
||||
-> IoResult<~RtioFileStream:Send> {
|
||||
file::open(path, fm, fa).map(|fd| ~fd as ~RtioFileStream:Send)
|
||||
}
|
||||
fn fs_unlink(&mut self, path: &CString) -> IoResult<()> {
|
||||
file::unlink(path)
|
||||
|
|
@ -304,25 +304,27 @@ impl rtio::IoFactory for IoFactory {
|
|||
}
|
||||
|
||||
// misc
|
||||
fn timer_init(&mut self) -> IoResult<~RtioTimer> {
|
||||
timer::Timer::new().map(|t| ~t as ~RtioTimer)
|
||||
fn timer_init(&mut self) -> IoResult<~RtioTimer:Send> {
|
||||
timer::Timer::new().map(|t| ~t as ~RtioTimer:Send)
|
||||
}
|
||||
fn spawn(&mut self, config: ProcessConfig)
|
||||
-> IoResult<(~RtioProcess, ~[Option<~RtioPipe>])> {
|
||||
-> IoResult<(~RtioProcess:Send, ~[Option<~RtioPipe:Send>])> {
|
||||
process::Process::spawn(config).map(|(p, io)| {
|
||||
(~p as ~RtioProcess,
|
||||
io.move_iter().map(|p| p.map(|p| ~p as ~RtioPipe)).collect())
|
||||
(~p as ~RtioProcess:Send,
|
||||
io.move_iter().map(|p| p.map(|p| ~p as ~RtioPipe:Send)).collect())
|
||||
})
|
||||
}
|
||||
fn kill(&mut self, pid: libc::pid_t, signum: int) -> IoResult<()> {
|
||||
process::Process::kill(pid, signum)
|
||||
}
|
||||
fn pipe_open(&mut self, fd: c_int) -> IoResult<~RtioPipe> {
|
||||
Ok(~file::FileDesc::new(fd, true) as ~RtioPipe)
|
||||
fn pipe_open(&mut self, fd: c_int) -> IoResult<~RtioPipe:Send> {
|
||||
Ok(~file::FileDesc::new(fd, true) as ~RtioPipe:Send)
|
||||
}
|
||||
fn tty_open(&mut self, fd: c_int, _readable: bool) -> IoResult<~RtioTTY> {
|
||||
fn tty_open(&mut self, fd: c_int, _readable: bool)
|
||||
-> IoResult<~RtioTTY:Send>
|
||||
{
|
||||
if unsafe { libc::isatty(fd) } != 0 {
|
||||
Ok(~file::FileDesc::new(fd, true) as ~RtioTTY)
|
||||
Ok(~file::FileDesc::new(fd, true) as ~RtioTTY:Send)
|
||||
} else {
|
||||
Err(IoError {
|
||||
kind: io::MismatchedFileTypeForOperation,
|
||||
|
|
@ -332,7 +334,7 @@ impl rtio::IoFactory for IoFactory {
|
|||
}
|
||||
}
|
||||
fn signal(&mut self, _signal: Signum, _channel: Sender<Signum>)
|
||||
-> IoResult<~RtioSignal> {
|
||||
-> IoResult<~RtioSignal:Send> {
|
||||
Err(unimpl())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -348,8 +348,8 @@ impl rtio::RtioTcpStream for TcpStream {
|
|||
self.set_keepalive(None)
|
||||
}
|
||||
|
||||
fn clone(&self) -> ~rtio::RtioTcpStream {
|
||||
~TcpStream { inner: self.inner.clone() } as ~rtio::RtioTcpStream
|
||||
fn clone(&self) -> ~rtio::RtioTcpStream:Send {
|
||||
~TcpStream { inner: self.inner.clone() } as ~rtio::RtioTcpStream:Send
|
||||
}
|
||||
fn close_write(&mut self) -> IoResult<()> {
|
||||
super::mkerr_libc(unsafe {
|
||||
|
|
@ -418,8 +418,8 @@ impl TcpListener {
|
|||
}
|
||||
|
||||
impl rtio::RtioTcpListener for TcpListener {
|
||||
fn listen(~self) -> IoResult<~rtio::RtioTcpAcceptor> {
|
||||
self.native_listen(128).map(|a| ~a as ~rtio::RtioTcpAcceptor)
|
||||
fn listen(~self) -> IoResult<~rtio::RtioTcpAcceptor:Send> {
|
||||
self.native_listen(128).map(|a| ~a as ~rtio::RtioTcpAcceptor:Send)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -461,8 +461,8 @@ impl rtio::RtioSocket for TcpAcceptor {
|
|||
}
|
||||
|
||||
impl rtio::RtioTcpAcceptor for TcpAcceptor {
|
||||
fn accept(&mut self) -> IoResult<~rtio::RtioTcpStream> {
|
||||
self.native_accept().map(|s| ~s as ~rtio::RtioTcpStream)
|
||||
fn accept(&mut self) -> IoResult<~rtio::RtioTcpStream:Send> {
|
||||
self.native_accept().map(|s| ~s as ~rtio::RtioTcpStream:Send)
|
||||
}
|
||||
|
||||
fn accept_simultaneously(&mut self) -> IoResult<()> { Ok(()) }
|
||||
|
|
@ -630,7 +630,7 @@ impl rtio::RtioUdpSocket for UdpSocket {
|
|||
self.set_broadcast(false)
|
||||
}
|
||||
|
||||
fn clone(&self) -> ~rtio::RtioUdpSocket {
|
||||
~UdpSocket { inner: self.inner.clone() } as ~rtio::RtioUdpSocket
|
||||
fn clone(&self) -> ~rtio::RtioUdpSocket:Send {
|
||||
~UdpSocket { inner: self.inner.clone() } as ~rtio::RtioUdpSocket:Send
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,8 +150,8 @@ impl rtio::RtioPipe for UnixStream {
|
|||
}
|
||||
}
|
||||
|
||||
fn clone(&self) -> ~rtio::RtioPipe {
|
||||
~UnixStream { inner: self.inner.clone() } as ~rtio::RtioPipe
|
||||
fn clone(&self) -> ~rtio::RtioPipe:Send {
|
||||
~UnixStream { inner: self.inner.clone() } as ~rtio::RtioPipe:Send
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -250,8 +250,8 @@ impl UnixListener {
|
|||
}
|
||||
|
||||
impl rtio::RtioUnixListener for UnixListener {
|
||||
fn listen(~self) -> IoResult<~rtio::RtioUnixAcceptor> {
|
||||
self.native_listen(128).map(|a| ~a as ~rtio::RtioUnixAcceptor)
|
||||
fn listen(~self) -> IoResult<~rtio::RtioUnixAcceptor:Send> {
|
||||
self.native_listen(128).map(|a| ~a as ~rtio::RtioUnixAcceptor:Send)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -279,7 +279,7 @@ impl UnixAcceptor {
|
|||
}
|
||||
|
||||
impl rtio::RtioUnixAcceptor for UnixAcceptor {
|
||||
fn accept(&mut self) -> IoResult<~rtio::RtioPipe> {
|
||||
self.native_accept().map(|s| ~s as ~rtio::RtioPipe)
|
||||
fn accept(&mut self) -> IoResult<~rtio::RtioPipe:Send> {
|
||||
self.native_accept().map(|s| ~s as ~rtio::RtioPipe:Send)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue