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

@ -827,11 +827,11 @@ pub unsafe trait Alloc {
let old_size = layout.size();
if new_size >= old_size {
if let Ok(()) = self.grow_in_place(ptr, layout.clone(), new_size) {
if let Ok(()) = self.grow_in_place(ptr, layout, new_size) {
return Ok(ptr);
}
} else if new_size < old_size {
if let Ok(()) = self.shrink_in_place(ptr, layout.clone(), new_size) {
if let Ok(()) = self.shrink_in_place(ptr, layout, new_size) {
return Ok(ptr);
}
}