Skip to content

Commit 63b233c

Browse files
committed
std and green: fix some warnings
1 parent e0e8e95 commit 63b233c

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/libgreen/sched.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1473,7 +1473,7 @@ mod test {
14731473
let mut handle = pool.spawn_sched();
14741474
handle.send(PinnedTask(pool.task(TaskOpts::new(), proc() {
14751475
unsafe {
1476-
let mut guard = LOCK.lock();
1476+
let guard = LOCK.lock();
14771477

14781478
start_tx.send(());
14791479
guard.wait(); // block the scheduler thread
@@ -1509,7 +1509,7 @@ mod test {
15091509
child_tx.send(20);
15101510
pingpong(&parent_rx, &child_tx);
15111511
unsafe {
1512-
let mut guard = LOCK.lock();
1512+
let guard = LOCK.lock();
15131513
guard.signal(); // wakeup waiting scheduler
15141514
guard.wait(); // wait for them to grab the lock
15151515
}

src/libstd/iter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2335,7 +2335,7 @@ mod tests {
23352335

23362336
#[test]
23372337
fn test_counter_from_iter() {
2338-
let mut it = count(0, 5).take(10);
2338+
let it = count(0, 5).take(10);
23392339
let xs: ~[int] = FromIterator::from_iterator(it);
23402340
assert_eq!(xs, ~[0, 5, 10, 15, 20, 25, 30, 35, 40, 45]);
23412341
}

src/libstd/str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3218,7 +3218,7 @@ mod tests {
32183218
let data = ~"ประเทศไทย中";
32193219
let mut cpy = data.clone();
32203220
let other = "abc";
3221-
let mut it = other.chars();
3221+
let it = other.chars();
32223222
cpy.extend(it);
32233223
assert_eq!(cpy, data + other);
32243224
}

src/libstd/unstable/mutex.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ mod test {
621621
#[test]
622622
fn destroy_immediately() {
623623
unsafe {
624-
let mut m = StaticNativeMutex::new();
624+
let m = StaticNativeMutex::new();
625625
m.destroy();
626626
}
627627
}

0 commit comments

Comments
 (0)