about summary refs log tree commit diff
path: root/src/libcoretest
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2014-10-08 17:15:27 -0700
committerBrian Anderson <banderson@mozilla.com>2014-11-21 13:17:04 -0800
commitc2aff692fa88235d356725f98184a5ea5b52eb88 (patch)
tree07f840ccdb488f4d62cbd8ce7fefceac41c67ed1 /src/libcoretest
parentac2f379abb13b249aa1e630e14fa42f9415160f8 (diff)
downloadrust-c2aff692fa88235d356725f98184a5ea5b52eb88.tar.gz
rust-c2aff692fa88235d356725f98184a5ea5b52eb88.zip
unicode: Rename UnicodeChar::is_digit to is_numeric
'Numeric' is the proper name of the unicode character class,
and this frees up the word 'digit' for ascii use in libcore.

Since I'm going to rename `Char::is_digit_radix` to
`is_digit`, I am not leaving a deprecated method in place,
because that would just cause name clashes, as both
`Char` and `UnicodeChar` are in the prelude.

[breaking-change]
Diffstat (limited to 'src/libcoretest')
-rw-r--r--src/libcoretest/char.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libcoretest/char.rs b/src/libcoretest/char.rs
index 8ec3c59da4e..2d5ca983fec 100644
--- a/src/libcoretest/char.rs
+++ b/src/libcoretest/char.rs
@@ -105,12 +105,12 @@ fn test_is_control() {
 
 #[test]
 fn test_is_digit() {
-   assert!('2'.is_digit());
-   assert!('7'.is_digit());
-   assert!(!'c'.is_digit());
-   assert!(!'i'.is_digit());
-   assert!(!'z'.is_digit());
-   assert!(!'Q'.is_digit());
+   assert!('2'.is_numeric());
+   assert!('7'.is_numeric());
+   assert!(!'c'.is_numeric());
+   assert!(!'i'.is_numeric());
+   assert!(!'z'.is_numeric());
+   assert!(!'Q'.is_numeric());
 }
 
 #[test]