From e921e3f04513ffb094208a538a2835d4dc77b991 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 2 Jan 2015 09:24:56 -0800 Subject: Rollup test fixes and rebase conflicts --- src/libstd/sys/common/helper_thread.rs | 1 - src/libstd/sys/unix/pipe.rs | 2 -- src/libstd/sys/windows/mod.rs | 3 +-- src/libstd/sys/windows/timer.rs | 9 ++++----- 4 files changed, 5 insertions(+), 10 deletions(-) (limited to 'src/libstd/sys') diff --git a/src/libstd/sys/common/helper_thread.rs b/src/libstd/sys/common/helper_thread.rs index 1ce42aaa175..bdf1bf3dfd0 100644 --- a/src/libstd/sys/common/helper_thread.rs +++ b/src/libstd/sys/common/helper_thread.rs @@ -23,7 +23,6 @@ use prelude::v1::*; use cell::UnsafeCell; -use comm::{channel, Sender, Receiver}; use mem; use rt; use sync::{StaticMutex, StaticCondvar}; diff --git a/src/libstd/sys/unix/pipe.rs b/src/libstd/sys/unix/pipe.rs index 0ab213cd0af..623f3f6a89c 100644 --- a/src/libstd/sys/unix/pipe.rs +++ b/src/libstd/sys/unix/pipe.rs @@ -10,8 +10,6 @@ use prelude::v1::*; -use prelude::*; - use libc; use c_str::CString; use mem; diff --git a/src/libstd/sys/windows/mod.rs b/src/libstd/sys/windows/mod.rs index d625e63952a..1034f0615d9 100644 --- a/src/libstd/sys/windows/mod.rs +++ b/src/libstd/sys/windows/mod.rs @@ -24,13 +24,12 @@ use num; use mem; use io::{mod, IoResult, IoError}; use sync::{Once, ONCE_INIT}; -use comm::Sender; macro_rules! helper_init { (static $name:ident: Helper<$m:ty>) => ( static $name: Helper<$m> = Helper { lock: ::sync::MUTEX_INIT, cond: ::sync::CONDVAR_INIT, - chan: ::cell::UnsafeCell { value: 0 as *mut Sender<$m> }, + chan: ::cell::UnsafeCell { value: 0 as *mut ::sync::mpsc::Sender<$m> }, signal: ::cell::UnsafeCell { value: 0 }, initialized: ::cell::UnsafeCell { value: false }, shutdown: ::cell::UnsafeCell { value: false }, diff --git a/src/libstd/sys/windows/timer.rs b/src/libstd/sys/windows/timer.rs index 485dc251050..343b78543bf 100644 --- a/src/libstd/sys/windows/timer.rs +++ b/src/libstd/sys/windows/timer.rs @@ -25,10 +25,9 @@ use prelude::v1::*; use libc; use ptr; -use comm; -use comm::{channel, Sender, Receiver}; use io::IoResult; +use sync::mpsc::{channel, Sender, Receiver, TryRecvError}; use sys::c; use sys::fs::FileDesc; use sys_common::helper_thread::Helper; @@ -72,7 +71,7 @@ fn helper(input: libc::HANDLE, messages: Receiver, _: ()) { chans.push((c, one)); } Ok(RemoveTimer(obj, c)) => { - c.send(()); + c.send(()).unwrap(); match objs.iter().position(|&o| o == obj) { Some(i) => { drop(objs.remove(i)); @@ -81,7 +80,7 @@ fn helper(input: libc::HANDLE, messages: Receiver, _: ()) { None => {} } } - Err(comm::Disconnected) => { + Err(TryRecvError::Disconnected) => { assert_eq!(objs.len(), 1); assert_eq!(chans.len(), 0); break 'outer; @@ -133,7 +132,7 @@ impl Timer { let (tx, rx) = channel(); HELPER.send(RemoveTimer(self.obj, tx)); - rx.recv(); + rx.recv().unwrap(); self.on_worker = false; } -- cgit 1.4.1-3-g733a5