Fix clippy::clone_on_copy warnings
This commit is contained in:
parent
21d5b8bf0c
commit
f93032c818
5 changed files with 9 additions and 9 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue