We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96c9837 commit 50b4ff8Copy full SHA for 50b4ff8
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: 031e86ca2d3f070d22d6efbebe42e75d606503b3
+refs/heads/master: 73044b3455b7586557eabbd249023d0a363401d0
trunk/src/lib/_uint.rs
@@ -37,12 +37,11 @@ fn parse_buf(vec[u8] buf, uint radix) -> uint {
37
auto i = _vec.len[u8](buf) - 1u;
38
auto power = 1u;
39
auto n = 0u;
40
- while (i >= 0u) {
+ while (true) {
41
n += (((buf.(i)) - ('0' as u8)) as uint) * power;
42
power *= radix;
43
- i -= 1u;
+ if (i == 0u) { ret n; }
44
}
45
- ret n;
46
47
48
fn to_str(uint num, uint radix) -> str
0 commit comments