aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/util/workqueue.rs
diff options
context:
space:
mode:
authorJack Moffitt <jack@metajack.im>2014-06-01 00:21:53 -0600
committerJack Moffitt <jack@metajack.im>2014-06-05 09:58:59 -0600
commit629c4c6afe7cea86c051bb9f52adeac716e2c43f (patch)
treeee84d9a9b37ecd37e0a9606509624e7f728f5a81 /src/components/util/workqueue.rs
parent2ae671b5aa9d27812adcdb8ebc749733156df66e (diff)
downloadservo-629c4c6afe7cea86c051bb9f52adeac716e2c43f.tar.gz
servo-629c4c6afe7cea86c051bb9f52adeac716e2c43f.zip
Upgrade Rust.
Diffstat (limited to 'src/components/util/workqueue.rs')
-rw-r--r--src/components/util/workqueue.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/components/util/workqueue.rs b/src/components/util/workqueue.rs
index 7c28abbb821..5caa6ff7ca0 100644
--- a/src/components/util/workqueue.rs
+++ b/src/components/util/workqueue.rs
@@ -10,7 +10,6 @@
use native;
use rand;
use rand::{Rng, XorShiftRng};
-use std::cast;
use std::mem;
use std::sync::atomics::{AtomicUint, SeqCst};
use std::sync::deque::{Abort, BufferPool, Data, Empty, Stealer, Worker};
@@ -92,7 +91,7 @@ impl<QueueData: Send, WorkData: Send> WorkerThread<QueueData, WorkData> {
// FIXME(pcwalton): Nasty workaround for the lack of labeled break/continue
// cross-crate.
let mut work_unit = unsafe {
- mem::uninit()
+ mem::uninitialized()
};
match deque.pop() {
Some(work) => work_unit = work,
@@ -179,7 +178,7 @@ impl<'a, QueueData, WorkData: Send> WorkerProxy<'a, QueueData, WorkData> {
#[inline]
pub fn user_data<'a>(&'a self) -> &'a QueueData {
unsafe {
- cast::transmute(self.queue_data)
+ mem::transmute(self.queue_data)
}
}
}
@@ -205,7 +204,7 @@ impl<QueueData: Send, WorkData: Send> WorkQueue<QueueData, WorkData> {
let (mut infos, mut threads) = (vec!(), vec!());
for i in range(0, thread_count) {
let (worker_chan, worker_port) = channel();
- let mut pool = BufferPool::new();
+ let pool = BufferPool::new();
let (worker, thief) = pool.deque();
infos.push(WorkerInfo {
chan: worker_chan,