@@ -40,10 +40,10 @@ pub enum ExponentFormat {
40
40
pub enum SignificantDigits {
41
41
/// At most the given number of digits will be printed, truncating any
42
42
/// trailing zeroes.
43
- DigMax ( uint ) ,
43
+ DigMax ( usize ) ,
44
44
45
45
/// Precisely the given number of digits will be printed.
46
- DigExact ( uint )
46
+ DigExact ( usize )
47
47
}
48
48
49
49
/// How to emit the sign of a number.
@@ -240,27 +240,27 @@ pub fn float_to_str_bytes_common<T: Float, U, F>(
240
240
// If reached left end of number, have to
241
241
// insert additional digit:
242
242
if i < 0
243
- || buf[ i as uint ] == b'-'
244
- || buf[ i as uint ] == b'+' {
245
- for j in ( i as uint + 1 ..end) . rev ( ) {
243
+ || buf[ i as usize ] == b'-'
244
+ || buf[ i as usize ] == b'+' {
245
+ for j in ( i as usize + 1 ..end) . rev ( ) {
246
246
buf[ j + 1 ] = buf[ j] ;
247
247
}
248
- buf[ ( i + 1 ) as uint ] = value2ascii ( 1 ) ;
248
+ buf[ ( i + 1 ) as usize ] = value2ascii ( 1 ) ;
249
249
end += 1 ;
250
250
break ;
251
251
}
252
252
253
253
// Skip the '.'
254
- if buf[ i as uint ] == b'.' { i -= 1 ; continue ; }
254
+ if buf[ i as usize ] == b'.' { i -= 1 ; continue ; }
255
255
256
256
// Either increment the digit,
257
257
// or set to 0 if max and carry the 1.
258
- let current_digit = ascii2value ( buf[ i as uint ] ) ;
258
+ let current_digit = ascii2value ( buf[ i as usize ] ) ;
259
259
if current_digit < ( radix - 1 ) {
260
- buf[ i as uint ] = value2ascii ( current_digit+1 ) ;
260
+ buf[ i as usize ] = value2ascii ( current_digit+1 ) ;
261
261
break ;
262
262
} else {
263
- buf[ i as uint ] = value2ascii ( 0 ) ;
263
+ buf[ i as usize ] = value2ascii ( 0 ) ;
264
264
i -= 1 ;
265
265
}
266
266
}
@@ -311,7 +311,7 @@ pub fn float_to_str_bytes_common<T: Float, U, F>(
311
311
312
312
struct Filler < ' a > {
313
313
buf : & ' a mut [ u8 ] ,
314
- end : & ' a mut uint ,
314
+ end : & ' a mut usize ,
315
315
}
316
316
317
317
impl < ' a > fmt:: Write for Filler < ' a > {
0 commit comments