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

@@ -408,7 +408,7 @@ mod tests {
#[test]
fn choose_option() {
let r = rand::Rng();
assert r.choose_option(~[]) == None::<int>;
assert r.choose_option(~[]).is_none();
assert r.choose_option(~[1, 1, 1]) == Some(1);
}
@@ -431,7 +431,7 @@ mod tests {
{weight: 0u, item: 42},
{weight: 1u, item: 43}
]) == Some(43);
assert r.choose_weighted_option(~[]) == None::<int>;
assert r.choose_weighted_option(~[]).is_none();
}
#[test]