Test fixes and rebase conflicts

This commit is contained in:
Alex Crichton 2014-05-07 23:39:56 -07:00
parent 8e95302181
commit 418f197351
4 changed files with 10 additions and 10 deletions

View File

@ -168,7 +168,7 @@ impl rtio::RtioPipe for UnixStream {
libc::send(fd,
buf as *mut libc::c_void,
len as libc::size_t,
flags)
flags) as i64
};
match net::write(fd, self.write_deadline, buf, true, dolock, dowrite) {
Ok(_) => Ok(()),

View File

@ -645,7 +645,7 @@ impl rtio::RtioUdpSocket for UdpWatcher {
n => Err(uv_error_to_io_error(UvError(n)))
}
}
let new_cx = ~UdpSendCtx {
let new_cx = box UdpSendCtx {
result: 0,
udp: 0 as *mut UdpWatcher,
data: cx.data.take(),
@ -670,7 +670,7 @@ impl rtio::RtioUdpSocket for UdpWatcher {
let udp: &mut UdpWatcher = unsafe { &mut *cx.udp };
wakeup(&mut udp.blocked_sender);
} else {
let _cx: ~UdpSendCtx = unsafe { cast::transmute(cx) };
let _cx: Box<UdpSendCtx> = unsafe { cast::transmute(cx) };
}
}
}

View File

@ -205,7 +205,7 @@ impl StreamWatcher {
// Note that we don't cache this write request back in the
// stream watcher because we no longer have ownership of it, and
// we never will.
let new_wcx = ~WriteContext {
let new_wcx = box WriteContext {
result: 0,
stream: 0 as *mut StreamWatcher,
data: wcx.data.take(),
@ -272,6 +272,6 @@ extern fn write_cb(req: *uvll::uv_write_t, status: c_int) {
let stream: &mut StreamWatcher = unsafe { &mut *wcx.stream };
wakeup(&mut stream.blocked_writer);
} else {
let _wcx: ~WriteContext = unsafe { cast::transmute(wcx) };
let _wcx: Box<WriteContext> = unsafe { cast::transmute(wcx) };
}
}

View File

@ -25,7 +25,7 @@ use {UvHandle, wait_until_woken_after};
/// Managment of a timeout when gaining access to a portion of a duplex stream.
pub struct AccessTimeout {
state: TimeoutState,
timer: Option<~TimerWatcher>,
timer: Option<Box<TimerWatcher>>,
pub access: access::Access,
}
@ -119,8 +119,8 @@ impl AccessTimeout {
// If we have a timeout, lazily initialize the timer which will be used
// to fire when the timeout runs out.
if self.timer.is_none() {
let mut timer = ~TimerWatcher::new_home(loop_, home.clone());
let cx = ~TimerContext {
let mut timer = box TimerWatcher::new_home(loop_, home.clone());
let cx = box TimerContext {
timeout: self as *mut _,
callback: cb,
payload: data,
@ -199,7 +199,7 @@ impl Drop for AccessTimeout {
match self.timer {
Some(ref timer) => unsafe {
let data = uvll::get_data_for_uv_handle(timer.handle);
let _data: ~TimerContext = cast::transmute(data);
let _data: Box<TimerContext> = cast::transmute(data);
},
None => {}
}
@ -213,7 +213,7 @@ impl Drop for AccessTimeout {
pub struct ConnectCtx {
pub status: c_int,
pub task: Option<BlockedTask>,
pub timer: Option<~TimerWatcher>,
pub timer: Option<Box<TimerWatcher>>,
}
pub struct AcceptTimeout {