diff --git a/src/lib/float.rs b/src/lib/float.rs index 928f33ecc02..1d444b3111a 100644 --- a/src/lib/float.rs +++ b/src/lib/float.rs @@ -64,7 +64,7 @@ fn from_str(num: str) -> float { c = char_range.ch; pos = char_range.next; alt c { - '0' | '1' | '2' | '3' | '4' | '5' | '6'| '7' | '8' | '9' { + '0' to '9' { total = total * 10f; total += ((c as int) - ('0' as int)) as float; }