Fix clippy::clone_on_copy warnings

This commit is contained in:
Mateusz Mikuła 2019-07-18 14:16:04 +02:00 committed by Mateusz Mikuła
parent 21d5b8bf0c
commit f93032c818
5 changed files with 9 additions and 9 deletions

View file

@ -29,7 +29,7 @@ unsafe impl GlobalAlloc for System {
if layout.align() <= MIN_ALIGN && layout.align() <= layout.size() {
libc::calloc(layout.size(), 1) as *mut u8
} else {
let ptr = self.alloc(layout.clone());
let ptr = self.alloc(layout);
if !ptr.is_null() {
ptr::write_bytes(ptr, 0, layout.size());
}