about summary refs log tree commit diff
path: root/src/liballoc/heap.rs
diff options
context:
space:
mode:
authorwe <vadim.petrochenkov@gmail.com>2015-01-17 07:34:10 +0300
committerwe <vadim.petrochenkov@gmail.com>2015-01-17 07:34:10 +0300
commit812ce6c190d896cf1cc1bef9f22c00266e962c43 (patch)
treea70faf13b6c86821d8cdfe12d4eebc6985201859 /src/liballoc/heap.rs
parent378fb5846d2d8dbc5ab24a5e92794c5c39d492dc (diff)
downloadrust-812ce6c190d896cf1cc1bef9f22c00266e962c43.tar.gz
rust-812ce6c190d896cf1cc1bef9f22c00266e962c43.zip
Remove unnecessary explicit conversions to *const T
Diffstat (limited to 'src/liballoc/heap.rs')
-rw-r--r--src/liballoc/heap.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/heap.rs b/src/liballoc/heap.rs
index b7bc1b47646..bd5b43b782e 100644
--- a/src/liballoc/heap.rs
+++ b/src/liballoc/heap.rs
@@ -298,7 +298,7 @@ mod imp {
             libc::realloc(ptr as *mut libc::c_void, size as libc::size_t) as *mut u8
         } else {
             let new_ptr = allocate(size, align);
-            ptr::copy_memory(new_ptr, ptr as *const u8, cmp::min(size, old_size));
+            ptr::copy_memory(new_ptr, ptr, cmp::min(size, old_size));
             deallocate(ptr, old_size, align);
             new_ptr
         }