diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2013-07-03 16:34:17 +1000 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2013-07-04 00:46:50 +1000 |
| commit | cdea73cf5b94784fdc910ab23d5d3455c868d247 (patch) | |
| tree | 2dd80963877ed91797384bf52752e1d87a095a9a /src/libstd/rt | |
| parent | a732a2daffefffb1b292c26810bec3fbb4a0b9f9 (diff) | |
| download | rust-cdea73cf5b94784fdc910ab23d5d3455c868d247.tar.gz rust-cdea73cf5b94784fdc910ab23d5d3455c868d247.zip | |
Convert vec::{as_imm_buf, as_mut_buf} to methods.
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/uv/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/rt/uv/mod.rs b/src/libstd/rt/uv/mod.rs index f50efc079a7..092d7366202 100644 --- a/src/libstd/rt/uv/mod.rs +++ b/src/libstd/rt/uv/mod.rs @@ -40,6 +40,7 @@ use str::raw::from_c_str; use to_str::ToStr; use ptr::RawPtr; use vec; +use vec::ImmutableVector; use ptr; use str; use libc::{c_void, c_int, size_t, malloc, free}; @@ -300,7 +301,7 @@ pub fn vec_to_uv_buf(v: ~[u8]) -> Buf { unsafe { let data = malloc(v.len() as size_t) as *u8; assert!(data.is_not_null()); - do vec::as_imm_buf(v) |b, l| { + do v.as_imm_buf |b, l| { let data = data as *mut u8; ptr::copy_memory(data, b, l) } |
