about summary refs log tree commit diff
path: root/src/libstd/sys/windows/os.rs
diff options
context:
space:
mode:
authorNick Cameron <ncameron@mozilla.com>2014-11-18 13:49:09 +1300
committerNick Cameron <ncameron@mozilla.com>2014-11-18 20:43:38 +1300
commit225de0d60f8ca8dcc62ab2fd8818ebbda4b58cfe (patch)
treeafd65a72f97755ed467590b5a9934da862a5dab4 /src/libstd/sys/windows/os.rs
parentd46f7adb536a44975622890e166c7cdfc698c259 (diff)
downloadrust-225de0d60f8ca8dcc62ab2fd8818ebbda4b58cfe.tar.gz
rust-225de0d60f8ca8dcc62ab2fd8818ebbda4b58cfe.zip
Windows and OS X fallout
Diffstat (limited to 'src/libstd/sys/windows/os.rs')
-rw-r--r--src/libstd/sys/windows/os.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sys/windows/os.rs b/src/libstd/sys/windows/os.rs
index aaa1aaf6327..aa43b42e746 100644
--- a/src/libstd/sys/windows/os.rs
+++ b/src/libstd/sys/windows/os.rs
@@ -76,7 +76,7 @@ pub fn error_string(errnum: i32) -> String {
             return format!("OS Error {} (FormatMessageW() returned error {})", errnum, fm_err);
         }
 
-        let msg = String::from_utf16(::str::truncate_utf16_at_nul(buf));
+        let msg = String::from_utf16(::str::truncate_utf16_at_nul(&buf));
         match msg {
             Some(msg) => format!("OS Error {}: {}", errnum, msg),
             None => format!("OS Error {} (FormatMessageW() returned invalid UTF-16)", errnum),