diff options
| author | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2013-08-03 17:13:14 -0700 |
|---|---|---|
| committer | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2013-08-04 14:13:17 -0700 |
| commit | 3102b1797e24b9dd8eef2f68a74ec83749d7b53d (patch) | |
| tree | c68578899941c134b1bc4e59999d5a40047f89f0 /src/libstd/sys.rs | |
| parent | 0512475fdab549182e73a42c2cd02df0cb710ebf (diff) | |
| download | rust-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.rs | 10 |
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) } } |
