diff options
| author | Mikhail Zabaluev <mikhail.zabaluev@gmail.com> | 2015-02-04 01:00:38 +0200 |
|---|---|---|
| committer | Mikhail Zabaluev <mikhail.zabaluev@gmail.com> | 2015-02-05 13:54:26 +0200 |
| commit | 3ac862816fc57fb6047986624d98f986cbfd40b9 (patch) | |
| tree | 3f98052301b15a4ddb142978f7c713dc06583f31 /src/libflate/lib.rs | |
| parent | 2bd8ec2d197809fc0f0efccf1de14419ffb17b2b (diff) | |
Replace usage of slice::from_raw_buf with slice::from_raw_parts
New functions, slice::from_raw_parts and slice::from_raw_parts_mut, are added to implement the lifetime convention as agreed in RFC PR #556. The functions slice::from_raw_buf and slice::from_raw_mut_buf are left deprecated for the time being.
Diffstat (limited to 'src/libflate/lib.rs')
| -rw-r--r-- | src/libflate/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libflate/lib.rs b/src/libflate/lib.rs index a3bbba6d7b4..6c0c0000214 100644 --- a/src/libflate/lib.rs +++ b/src/libflate/lib.rs @@ -45,7 +45,7 @@ pub struct Bytes { impl Deref for Bytes { type Target = [u8]; fn deref(&self) -> &[u8] { - unsafe { slice::from_raw_mut_buf(&self.ptr.0, self.len) } + unsafe { slice::from_raw_parts_mut(self.ptr.0, self.len) } } } |
