std and green: fix some warnings
This commit is contained in:
parent
e0e8e957ea
commit
63b233c25d
@ -1473,7 +1473,7 @@ mod test {
|
||||
let mut handle = pool.spawn_sched();
|
||||
handle.send(PinnedTask(pool.task(TaskOpts::new(), proc() {
|
||||
unsafe {
|
||||
let mut guard = LOCK.lock();
|
||||
let guard = LOCK.lock();
|
||||
|
||||
start_tx.send(());
|
||||
guard.wait(); // block the scheduler thread
|
||||
@ -1509,7 +1509,7 @@ mod test {
|
||||
child_tx.send(20);
|
||||
pingpong(&parent_rx, &child_tx);
|
||||
unsafe {
|
||||
let mut guard = LOCK.lock();
|
||||
let guard = LOCK.lock();
|
||||
guard.signal(); // wakeup waiting scheduler
|
||||
guard.wait(); // wait for them to grab the lock
|
||||
}
|
||||
|
@ -2335,7 +2335,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_counter_from_iter() {
|
||||
let mut it = count(0, 5).take(10);
|
||||
let it = count(0, 5).take(10);
|
||||
let xs: ~[int] = FromIterator::from_iterator(it);
|
||||
assert_eq!(xs, ~[0, 5, 10, 15, 20, 25, 30, 35, 40, 45]);
|
||||
}
|
||||
|
@ -3218,7 +3218,7 @@ mod tests {
|
||||
let data = ~"ประเทศไทย中";
|
||||
let mut cpy = data.clone();
|
||||
let other = "abc";
|
||||
let mut it = other.chars();
|
||||
let it = other.chars();
|
||||
cpy.extend(it);
|
||||
assert_eq!(cpy, data + other);
|
||||
}
|
||||
|
@ -621,7 +621,7 @@ mod test {
|
||||
#[test]
|
||||
fn destroy_immediately() {
|
||||
unsafe {
|
||||
let mut m = StaticNativeMutex::new();
|
||||
let m = StaticNativeMutex::new();
|
||||
m.destroy();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user