about summary refs log tree commit diff
path: root/src/libstd/io/native
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-12-15 06:56:27 -0800
committerbors <bors@rust-lang.org>2013-12-15 06:56:27 -0800
commit8d52dfbace05c46754f4f6bb5a25f55906c9d7b0 (patch)
tree2fe29e4faba8034176fe5c1f14bd2659ca0c7235 /src/libstd/io/native
parentef7969e86f0b53e4236ca627b31ac09413c07b82 (diff)
parent164f7a290ef98377e4c8c158eca2fbed098a2842 (diff)
downloadrust-8d52dfbace05c46754f4f6bb5a25f55906c9d7b0.tar.gz
rust-8d52dfbace05c46754f4f6bb5a25f55906c9d7b0.zip
auto merge of #10984 : huonw/rust/clean-raw, r=cmr
See commits for details.
Diffstat (limited to 'src/libstd/io/native')
-rw-r--r--src/libstd/io/native/file.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/io/native/file.rs b/src/libstd/io/native/file.rs
index 7b5104657d9..bd618dd6f0f 100644
--- a/src/libstd/io/native/file.rs
+++ b/src/libstd/io/native/file.rs
@@ -133,7 +133,7 @@ impl rtio::RtioFileStream for FileDesc {
         self.inner_write(buf)
     }
     fn pread(&mut self, buf: &mut [u8], offset: u64) -> Result<int, IoError> {
-        return os_pread(self.fd, vec::raw::to_ptr(buf), buf.len(), offset);
+        return os_pread(self.fd, buf.as_ptr(), buf.len(), offset);
 
         #[cfg(windows)]
         fn os_pread(fd: c_int, buf: *u8, amt: uint, offset: u64) -> IoResult<int> {
@@ -165,7 +165,7 @@ impl rtio::RtioFileStream for FileDesc {
         }
     }
     fn pwrite(&mut self, buf: &[u8], offset: u64) -> Result<(), IoError> {
-        return os_pwrite(self.fd, vec::raw::to_ptr(buf), buf.len(), offset);
+        return os_pwrite(self.fd, buf.as_ptr(), buf.len(), offset);
 
         #[cfg(windows)]
         fn os_pwrite(fd: c_int, buf: *u8, amt: uint, offset: u64) -> IoResult<()> {
@@ -700,13 +700,13 @@ pub fn readlink(p: &CString) -> IoResult<Path> {
         }
         let mut buf = vec::with_capacity::<u8>(len as uint);
         match unsafe {
-            libc::readlink(p, vec::raw::to_ptr(buf) as *mut libc::c_char,
+            libc::readlink(p, buf.as_ptr() as *mut libc::c_char,
                            len as libc::size_t)
         } {
             -1 => Err(super::last_error()),
             n => {
                 assert!(n > 0);
-                unsafe { vec::raw::set_len(&mut buf, n as uint); }
+                unsafe { buf.set_len(n as uint); }
                 Ok(Path::new(buf))
             }
         }