From 9750e83a17a8f9f865eae757dcdccf374b1c82b7 Mon Sep 17 00:00:00 2001 From: Kevin Cantu Date: Tue, 24 Jan 2012 23:47:32 -0800 Subject: Replace uses of str::unsafe_from_byte --- src/comp/metadata/tydecode.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/comp') diff --git a/src/comp/metadata/tydecode.rs b/src/comp/metadata/tydecode.rs index 2e4e5cdc66d..cbd11c1c1b9 100644 --- a/src/comp/metadata/tydecode.rs +++ b/src/comp/metadata/tydecode.rs @@ -39,7 +39,7 @@ fn parse_ident_(st: @pstate, is_last: fn@(char) -> bool) -> ast::ident { let rslt = ""; while !is_last(peek(st) as char) { - rslt += str::unsafe_from_byte(next(st)); + rslt += str::from_byte(next(st)); } ret rslt; } @@ -226,7 +226,7 @@ fn parse_ty(st: @pstate, conv: conv_did) -> ty::t { while peek(st) as char != ']' { let name = ""; while peek(st) as char != '=' { - name += str::unsafe_from_byte(next(st)); + name += str::from_byte(next(st)); } st.pos = st.pos + 1u; fields += [{ident: name, mt: parse_mt(st, conv)}]; -- cgit 1.4.1-3-g733a5