File tree Expand file tree Collapse file tree 3 files changed +15
-11
lines changed Expand file tree Collapse file tree 3 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: e8938f5fb2cfa756b8186f6ed33e2d0d509a31a0
2
+ refs/heads/master: 8aa946ff5e312543a4e3903ee0d3580fbd8d2887
Original file line number Diff line number Diff line change @@ -17,14 +17,15 @@ fn negative(int x) -> bool { ret x < 0; }
17
17
fn nonpositive ( int x) -> bool { ret x <= 0 ; }
18
18
fn nonnegative ( int x) -> bool { ret x >= 0 ; }
19
19
20
- iter range( mutable int lo, int hi) -> int {
21
- while ( lo < hi) {
22
- put lo;
23
- lo += 1 ;
20
+ iter range( int lo, int hi) -> int {
21
+ let int lo_ = lo;
22
+ while ( lo_ < hi) {
23
+ put lo_;
24
+ lo_ += 1 ;
24
25
}
25
26
}
26
27
27
- fn to_str( mutable int n, uint radix ) -> str
28
+ fn to_str( int n, uint radix ) -> str
28
29
{
29
30
check ( 0 u < radix && radix <= 16 u) ;
30
31
if ( n < 0 ) {
Original file line number Diff line number Diff line change @@ -12,10 +12,11 @@ fn ne(uint x, uint y) -> bool { ret x != y; }
12
12
fn ge ( uint x, uint y) -> bool { ret x >= y; }
13
13
fn gt ( uint x, uint y) -> bool { ret x > y; }
14
14
15
- iter range( mutable uint lo, uint hi) -> uint {
16
- while ( lo < hi) {
17
- put lo;
18
- lo += 1 u;
15
+ iter range( uint lo, uint hi) -> uint {
16
+ auto lo_ = lo;
17
+ while ( lo_ < hi) {
18
+ put lo_;
19
+ lo_ += 1 u;
19
20
}
20
21
}
21
22
@@ -32,8 +33,10 @@ fn next_power_of_two(uint n) -> uint {
32
33
ret tmp + 1 u;
33
34
}
34
35
35
- fn to_str ( mutable uint n , uint radix ) -> str
36
+ fn to_str ( uint num , uint radix ) -> str
36
37
{
38
+ auto n = num;
39
+
37
40
check ( 0 u < radix && radix <= 16 u) ;
38
41
fn digit ( uint n) -> char {
39
42
alt ( n) {
You can’t perform that action at this time.
0 commit comments