libcore: Replace a bunch of "== None" with ".is_none()".

Generally, "== None" calls into the shape glue, and it's also more useful.
This commit is contained in:
Patrick Walton
2012-08-27 17:49:35 -07:00
parent f2dcd7663a
commit ff513b1bcd
12 changed files with 80 additions and 80 deletions

View File

@@ -2090,7 +2090,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) == 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
@@ -2115,7 +2115,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) == None;
assert local_data_pop(my_key).is_none();
}
#[test]