File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5
- refs/heads/try: 2496dccae4622cb5fea9ae8f54adb0b83eadaf07
5
+ refs/heads/try: 9750e83a17a8f9f865eae757dcdccf374b1c82b7
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ fn parse_ident_(st: @pstate, is_last: fn@(char) -> bool) ->
39
39
ast:: ident {
40
40
let rslt = "" ;
41
41
while !is_last ( peek ( st) as char ) {
42
- rslt += str:: unsafe_from_byte ( next ( st) ) ;
42
+ rslt += str:: from_byte ( next ( st) ) ;
43
43
}
44
44
ret rslt;
45
45
}
@@ -226,7 +226,7 @@ fn parse_ty(st: @pstate, conv: conv_did) -> ty::t {
226
226
while peek ( st) as char != ']' {
227
227
let name = "" ;
228
228
while peek ( st) as char != '=' {
229
- name += str:: unsafe_from_byte ( next ( st) ) ;
229
+ name += str:: from_byte ( next ( st) ) ;
230
230
}
231
231
st. pos = st. pos + 1 u;
232
232
fields += [ { ident: name, mt: parse_mt ( st, conv) } ] ;
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ Function: unsafe_from_byte
146
146
Converts a byte to a string. Does not verify that the byte is
147
147
valid UTF-8.
148
148
149
- FIXME: rename to 'from_byte'
149
+ FIXME: REMOVE.
150
150
*/
151
151
fn unsafe_from_byte ( u : u8 ) -> str { unsafe_from_bytes ( [ u] ) }
152
152
Original file line number Diff line number Diff line change @@ -236,12 +236,12 @@ fn to_str(num: uint, radix: uint) -> str {
236
236
if n == 0 u { ret "0" ; }
237
237
let s: str = "" ;
238
238
while n != 0 u {
239
- s += str:: unsafe_from_byte ( digit ( n % radix) as u8 ) ;
239
+ s += str:: from_byte ( digit ( n % radix) as u8 ) ;
240
240
n /= radix;
241
241
}
242
242
let s1: str = "" ;
243
243
let len: uint = str:: byte_len ( s) ;
244
- while len != 0 u { len -= 1 u; s1 += str:: unsafe_from_byte ( s[ len] ) ; }
244
+ while len != 0 u { len -= 1 u; s1 += str:: from_byte ( s[ len] ) ; }
245
245
ret s1;
246
246
}
247
247
You can’t perform that action at this time.
0 commit comments