mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-27 22:34:14 +00:00
core/std: an unending parade of minor tweaks due to renaming Option et al
This commit is contained in:
parent
9ee7b31414
commit
6bdda1e0de
@ -1557,7 +1557,7 @@ unsafe fn local_set<T: Owned>(
|
||||
}
|
||||
None => {
|
||||
// Find an empty slot. If not, grow the vector.
|
||||
match (*map).position(|x| x.is_None()) {
|
||||
match (*map).position(|x| x.is_none()) {
|
||||
Some(empty_index) => (*map).set_elt(empty_index, new_entry),
|
||||
None => (*map).push(new_entry)
|
||||
}
|
||||
@ -2280,7 +2280,7 @@ fn test_tls_multitask() unsafe {
|
||||
fn my_key(+_x: @~str) { }
|
||||
local_data_set(my_key, @~"parent data");
|
||||
do task::spawn unsafe {
|
||||
assert local_data_get(my_key).is_None(); // TLS shouldn't carry over.
|
||||
assert local_data_get(my_key).is_none(); // TLS shouldn't carry over.
|
||||
local_data_set(my_key, @~"child data");
|
||||
assert *(local_data_get(my_key).get()) == ~"child data";
|
||||
// should be cleaned up for us
|
||||
@ -2305,7 +2305,7 @@ fn test_tls_pop() unsafe {
|
||||
local_data_set(my_key, @~"weasel");
|
||||
assert *(local_data_pop(my_key).get()) == ~"weasel";
|
||||
// Pop must remove the data from the map.
|
||||
assert local_data_pop(my_key).is_None();
|
||||
assert local_data_pop(my_key).is_none();
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Loading…
Reference in New Issue
Block a user