diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-09-01 18:38:05 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-09-01 18:38:18 -0700 |
| commit | 80c4f74c29ede062909db2b048b5b75820730994 (patch) | |
| tree | d3b43776d36ddcc9d9582ab95745df3fdbddd95c /src/libcore/float.rs | |
| parent | d777e5133360876baa4213f81a33934f04768a0f (diff) | |
| download | rust-80c4f74c29ede062909db2b048b5b75820730994.tar.gz rust-80c4f74c29ede062909db2b048b5b75820730994.zip | |
Remove the 'to' keyword
Diffstat (limited to 'src/libcore/float.rs')
| -rw-r--r-- | src/libcore/float.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/float.rs b/src/libcore/float.rs index 32fbcf209f6..125e9852f44 100644 --- a/src/libcore/float.rs +++ b/src/libcore/float.rs @@ -263,7 +263,7 @@ fn from_str(num: &str) -> Option<float> { //The string must start with one of the following characters. match str::char_at(num, 0u) { - '-' | '+' | '0' to '9' | '.' => (), + '-' | '+' | '0' .. '9' | '.' => (), _ => return None } @@ -286,7 +286,7 @@ fn from_str(num: &str) -> Option<float> { c = char_range.ch; pos = char_range.next; match c { - '0' to '9' => { + '0' .. '9' => { total = total * 10f; total += ((c as int) - ('0' as int)) as float; } |
