Skip to content

Commit 418f197

Browse files
committed
Test fixes and rebase conflicts
1 parent 8e95302 commit 418f197

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/libnative/io/pipe_unix.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl rtio::RtioPipe for UnixStream {
168168
libc::send(fd,
169169
buf as *mut libc::c_void,
170170
len as libc::size_t,
171-
flags)
171+
flags) as i64
172172
};
173173
match net::write(fd, self.write_deadline, buf, true, dolock, dowrite) {
174174
Ok(_) => Ok(()),

src/librustuv/net.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ impl rtio::RtioUdpSocket for UdpWatcher {
645645
n => Err(uv_error_to_io_error(UvError(n)))
646646
}
647647
}
648-
let new_cx = ~UdpSendCtx {
648+
let new_cx = box UdpSendCtx {
649649
result: 0,
650650
udp: 0 as *mut UdpWatcher,
651651
data: cx.data.take(),
@@ -670,7 +670,7 @@ impl rtio::RtioUdpSocket for UdpWatcher {
670670
let udp: &mut UdpWatcher = unsafe { &mut *cx.udp };
671671
wakeup(&mut udp.blocked_sender);
672672
} else {
673-
let _cx: ~UdpSendCtx = unsafe { cast::transmute(cx) };
673+
let _cx: Box<UdpSendCtx> = unsafe { cast::transmute(cx) };
674674
}
675675
}
676676
}

src/librustuv/stream.rs

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

src/librustuv/timeout.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use {UvHandle, wait_until_woken_after};
2525
/// Managment of a timeout when gaining access to a portion of a duplex stream.
2626
pub struct AccessTimeout {
2727
state: TimeoutState,
28-
timer: Option<~TimerWatcher>,
28+
timer: Option<Box<TimerWatcher>>,
2929
pub access: access::Access,
3030
}
3131

@@ -119,8 +119,8 @@ impl AccessTimeout {
119119
// If we have a timeout, lazily initialize the timer which will be used
120120
// to fire when the timeout runs out.
121121
if self.timer.is_none() {
122-
let mut timer = ~TimerWatcher::new_home(loop_, home.clone());
123-
let cx = ~TimerContext {
122+
let mut timer = box TimerWatcher::new_home(loop_, home.clone());
123+
let cx = box TimerContext {
124124
timeout: self as *mut _,
125125
callback: cb,
126126
payload: data,
@@ -199,7 +199,7 @@ impl Drop for AccessTimeout {
199199
match self.timer {
200200
Some(ref timer) => unsafe {
201201
let data = uvll::get_data_for_uv_handle(timer.handle);
202-
let _data: ~TimerContext = cast::transmute(data);
202+
let _data: Box<TimerContext> = cast::transmute(data);
203203
},
204204
None => {}
205205
}
@@ -213,7 +213,7 @@ impl Drop for AccessTimeout {
213213
pub struct ConnectCtx {
214214
pub status: c_int,
215215
pub task: Option<BlockedTask>,
216-
pub timer: Option<~TimerWatcher>,
216+
pub timer: Option<Box<TimerWatcher>>,
217217
}
218218

219219
pub struct AcceptTimeout {

0 commit comments

Comments
 (0)