diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2013-12-18 01:49:31 +1100 | 
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2013-12-19 09:26:13 +1100 | 
| commit | 4c79b22ef26a2b846d84c46bc8fea50c953559dd (patch) | |
| tree | 195c5edab1e773dcd7db4454b6d848a47d5a6249 /src/libstd/str.rs | |
| parent | ac137f6dbe51429de203ea2e900b8bac01f466cb (diff) | |
| download | rust-4c79b22ef26a2b846d84c46bc8fea50c953559dd.tar.gz rust-4c79b22ef26a2b846d84c46bc8fea50c953559dd.zip | |
std::vec: remove .as_imm_buf, replaced by .as_ptr & .len.
There's no need for the restrictions of a closure with the above methods.
Diffstat (limited to 'src/libstd/str.rs')
| -rw-r--r-- | src/libstd/str.rs | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/src/libstd/str.rs b/src/libstd/str.rs index f1310765130..e785ed74159 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -2502,7 +2502,7 @@ impl<'a> StrSlice<'a> for &'a str { #[inline] fn as_imm_buf<T>(&self, f: |*u8, uint| -> T) -> T { let v: &[u8] = unsafe { cast::transmute(*self) }; - v.as_imm_buf(f) + f(v.as_ptr(), v.len()) } } | 
