diff options
author | Matthew Rasmus <mattr@zzntd.com> | 2015-01-07 21:02:14 -0800 |
---|---|---|
committer | Matthew Rasmus <mattr@zzntd.com> | 2015-01-08 08:51:11 -0800 |
commit | 7bbce60e43a0782a62d625dd16452a54eef58820 (patch) | |
tree | 35909abaa2bd4124c8ee201d53b4464fcaead772 /components/util/debug_utils.rs | |
parent | 9cfd258a211e962301cd3f1f356f1c7995041c18 (diff) | |
download | servo-7bbce60e43a0782a62d625dd16452a54eef58820.tar.gz servo-7bbce60e43a0782a62d625dd16452a54eef58820.zip |
Fix `renamed to slice::from_raw_buf` warning
Diffstat (limited to 'components/util/debug_utils.rs')
-rw-r--r-- | components/util/debug_utils.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/util/debug_utils.rs b/components/util/debug_utils.rs index e8d6cd31fea..e43b1d11363 100644 --- a/components/util/debug_utils.rs +++ b/components/util/debug_utils.rs @@ -6,7 +6,7 @@ use std::io; use std::io::Writer; use std::mem; use std::mem::size_of; -use std::slice::raw::buf_as_slice; +use std::slice; fn hexdump_slice(buf: &[u8]) { let mut stderr = io::stderr(); @@ -28,6 +28,7 @@ pub fn hexdump<T>(obj: &T) { unsafe { let buf: *const u8 = mem::transmute(obj); debug!("dumping at {:p}", buf); - buf_as_slice(buf, size_of::<T>(), hexdump_slice); + let from_buf = slice::from_raw_buf(&buf, size_of::<T>()); + hexdump_slice(from_buf); } } |