char: small tweak since is_some
> equivalent match
.
This commit is contained in:
parent
e670fb484b
commit
990a79f097
1 changed files with 1 additions and 4 deletions
|
@ -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"]
|
||||
|
|
Loading…
Add table
Reference in a new issue