about summary refs log tree commit diff
path: root/src/libstd/sys.rs
diff options
context:
space:
mode:
authorErick Tryzelaar <erick.tryzelaar@gmail.com>2013-08-03 17:13:14 -0700
committerErick Tryzelaar <erick.tryzelaar@gmail.com>2013-08-04 14:13:17 -0700
commit3102b1797e24b9dd8eef2f68a74ec83749d7b53d (patch)
treec68578899941c134b1bc4e59999d5a40047f89f0 /src/libstd/sys.rs
parent0512475fdab549182e73a42c2cd02df0cb710ebf (diff)
downloadrust-3102b1797e24b9dd8eef2f68a74ec83749d7b53d.tar.gz
rust-3102b1797e24b9dd8eef2f68a74ec83749d7b53d.zip
std: replace str::as_c_str with std::c_str
Diffstat (limited to 'src/libstd/sys.rs')
-rw-r--r--src/libstd/sys.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/sys.rs b/src/libstd/sys.rs
index 51609709cdb..b40f87617a9 100644
--- a/src/libstd/sys.rs
+++ b/src/libstd/sys.rs
@@ -12,13 +12,13 @@
 
 #[allow(missing_doc)];
 
+use c_str::ToCStr;
 use cast;
 use gc;
 use io;
 use libc;
 use libc::{c_char, size_t};
 use repr;
-use str::StrSlice;
 use str;
 use unstable::intrinsics;
 
@@ -115,8 +115,8 @@ pub trait FailWithCause {
 
 impl FailWithCause for ~str {
     fn fail_with(cause: ~str, file: &'static str, line: uint) -> ! {
-        do cause.as_c_str |msg_buf| {
-            do file.as_c_str |file_buf| {
+        do cause.to_c_str().with_ref |msg_buf| {
+            do file.to_c_str().with_ref |file_buf| {
                 begin_unwind_(msg_buf, file_buf, line as libc::size_t)
             }
         }
@@ -125,8 +125,8 @@ impl FailWithCause for ~str {
 
 impl FailWithCause for &'static str {
     fn fail_with(cause: &'static str, file: &'static str, line: uint) -> ! {
-        do cause.as_c_str |msg_buf| {
-            do file.as_c_str |file_buf| {
+        do cause.to_c_str().with_ref |msg_buf| {
+            do file.to_c_str().with_ref |file_buf| {
                 begin_unwind_(msg_buf, file_buf, line as libc::size_t)
             }
         }