about summary refs log tree commit diff
path: root/src/libstd/os.rs
diff options
context:
space:
mode:
authorAdolfo OchagavĂ­a <aochagavia92@gmail.com>2014-07-19 12:08:34 +0200
committerAlex Crichton <alex@alexcrichton.com>2014-07-24 07:25:43 -0700
commiteacc5d779fe4080dd2b45e035ca2af099b8b906d (patch)
tree6b895ebcb49f2596add96c98eb10562ebe112e5a /src/libstd/os.rs
parentba707fb3a0735c0ca19baac426b88218c656a34b (diff)
downloadrust-eacc5d779fe4080dd2b45e035ca2af099b8b906d.tar.gz
rust-eacc5d779fe4080dd2b45e035ca2af099b8b906d.zip
Deprecated `str::raw::from_c_str`
Use `string::raw::from_buf` instead

[breaking-change]
Diffstat (limited to 'src/libstd/os.rs')
-rw-r--r--src/libstd/os.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/os.rs b/src/libstd/os.rs
index ca76be40cb5..1b61dec99b4 100644
--- a/src/libstd/os.rs
+++ b/src/libstd/os.rs
@@ -998,7 +998,7 @@ pub fn error_string(errnum: uint) -> String {
                 fail!("strerror_r failure");
             }
 
-            str::raw::from_c_str(p as *const c_char).into_string()
+            ::c_str::CString::new(p as *const c_char, false).as_str().unwrap().to_string()
         }
     }