about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-05-30 04:49:37 -0700
committerbors <bors@rust-lang.org>2013-05-30 04:49:37 -0700
commit682afcac5200019b363310f56cfabb78edea9397 (patch)
tree8d765b5e139ce63eab13d3d838903a7cf577ba70 /src/libstd
parentca74cbdc5cc7747e429a985b7b5fb5c4e4a5d4d5 (diff)
parent1720d9f663c07422b91cbb5fc857b625d120155c (diff)
downloadrust-682afcac5200019b363310f56cfabb78edea9397.tar.gz
rust-682afcac5200019b363310f56cfabb78edea9397.zip
auto merge of #6829 : dotdash/rust/allocs, r=sanxiyn
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/os.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libstd/os.rs b/src/libstd/os.rs
index cc36dcb92a2..446804f7b30 100644
--- a/src/libstd/os.rs
+++ b/src/libstd/os.rs
@@ -145,7 +145,7 @@ pub mod win32 {
     pub fn as_utf16_p<T>(s: &str, f: &fn(*u16) -> T) -> T {
         let mut t = str::to_utf16(s);
         // Null terminate before passing on.
-        t += ~[0u16];
+        t += [0u16];
         vec::as_imm_buf(t, |buf, _len| f(buf))
     }
 }
@@ -437,8 +437,7 @@ fn dup2(src: c_int, dst: c_int) -> c_int {
 
 /// Returns the proper dll filename for the given basename of a file.
 pub fn dll_filename(base: &str) -> ~str {
-    return str::to_owned(DLL_PREFIX) + str::to_owned(base) +
-           str::to_owned(DLL_SUFFIX)
+    fmt!("%s%s%s", DLL_PREFIX, base, DLL_SUFFIX)
 }
 
 /// Optionally returns the filesystem path to the current executable which is