@@ -47,9 +47,9 @@ use ptr;
47
47
use result:: { Err , Ok , Result } ;
48
48
use slice:: { Vector , ImmutableVector , MutableVector , ImmutableEqVector } ;
49
49
use str:: { Str , StrSlice , StrAllocating } ;
50
- use str;
51
50
use string:: String ;
52
51
use sync:: atomics:: { AtomicInt , INIT_ATOMIC_INT , SeqCst } ;
52
+ use to_str:: ToString ;
53
53
use vec:: Vec ;
54
54
55
55
#[ cfg( unix) ]
@@ -135,7 +135,7 @@ pub fn getcwd() -> Path {
135
135
fail ! ( ) ;
136
136
}
137
137
}
138
- Path :: new ( String :: from_utf16 ( str:: truncate_utf16_at_nul ( buf) )
138
+ Path :: new ( String :: from_utf16 ( :: str:: truncate_utf16_at_nul ( buf) )
139
139
. expect ( "GetCurrentDirectoryW returned invalid UTF-16" ) )
140
140
}
141
141
@@ -413,7 +413,7 @@ pub fn setenv<T: BytesContainer>(n: &str, v: T) {
413
413
fn _setenv ( n : & str , v : & [ u8 ] ) {
414
414
let n: Vec < u16 > = n. utf16_units ( ) . collect ( ) ;
415
415
let n = n. append_one ( 0 ) ;
416
- let v: Vec < u16 > = str:: from_utf8 ( v) . unwrap ( ) . utf16_units ( ) . collect ( ) ;
416
+ let v: Vec < u16 > = :: str:: from_utf8 ( v) . unwrap ( ) . utf16_units ( ) . collect ( ) ;
417
417
let v = v. append_one ( 0 ) ;
418
418
419
419
unsafe {
@@ -1045,7 +1045,7 @@ pub fn error_string(errnum: uint) -> String {
1045
1045
return format ! ( "OS Error {} (FormatMessageW() returned error {})" , errnum, fm_err) ;
1046
1046
}
1047
1047
1048
- let msg = String :: from_utf16 ( str:: truncate_utf16_at_nul ( buf) ) ;
1048
+ let msg = String :: from_utf16 ( :: str:: truncate_utf16_at_nul ( buf) ) ;
1049
1049
match msg {
1050
1050
Some ( msg) => format ! ( "OS Error {}: {}" , errnum, msg) ,
1051
1051
None => format ! ( "OS Error {} (FormatMessageW() returned invalid UTF-16)" , errnum) ,
@@ -1202,7 +1202,7 @@ fn real_args() -> Vec<String> {
1202
1202
1203
1203
// Push it onto the list.
1204
1204
let opt_s = slice:: raw:: buf_as_slice ( ptr as * const _ , len, |buf| {
1205
- String :: from_utf16 ( str:: truncate_utf16_at_nul ( buf) )
1205
+ String :: from_utf16 ( :: str:: truncate_utf16_at_nul ( buf) )
1206
1206
} ) ;
1207
1207
opt_s. expect ( "CommandLineToArgvW returned invalid UTF-16" )
1208
1208
} ) ;
0 commit comments