char: small tweak since is_some > equivalent match.

This commit is contained in:
Huon Wilson 2015-01-04 01:19:03 +11:00
parent e670fb484b
commit 990a79f097

View file

@ -198,10 +198,7 @@ pub trait CharExt {
impl CharExt for char {
#[unstable = "pending integer conventions"]
fn is_digit(self, radix: uint) -> bool {
match self.to_digit(radix) {
Some(_) => true,
None => false,
}
self.to_digit(radix).is_some()
}
#[unstable = "pending integer conventions"]