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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user