diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2015-01-04 01:19:03 +1100 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2015-01-05 12:30:51 +1100 |
| commit | 990a79f097e8e74308bfec6d72dcdbb769a7973b (patch) | |
| tree | 70356b35b7dcefa5f1634615957d46005dea54c5 /src/libcore | |
| parent | e670fb484b89dfbdfbee9b91497db61303882d8b (diff) | |
| download | rust-990a79f097e8e74308bfec6d72dcdbb769a7973b.tar.gz rust-990a79f097e8e74308bfec6d72dcdbb769a7973b.zip | |
char: small tweak since `is_some` > equivalent `match`.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/char.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libcore/char.rs b/src/libcore/char.rs index ce530ae1d32..291b7f2ece4 100644 --- a/src/libcore/char.rs +++ b/src/libcore/char.rs @@ -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"] |
