mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-09 06:08:29 +00:00
Apply cleanups proposed by clippy.
This commit is contained in:
@@ -267,7 +267,7 @@ impl LinearMemory {
|
||||
needs_signal_handlers,
|
||||
vm_memory_definition: if let Some(mem_loc) = vm_memory_location {
|
||||
{
|
||||
let mut ptr = mem_loc.clone();
|
||||
let mut ptr = mem_loc;
|
||||
let md = ptr.as_mut();
|
||||
md.base = base_ptr;
|
||||
md.current_length = mem_length;
|
||||
@@ -293,7 +293,7 @@ impl LinearMemory {
|
||||
/// this function. You can get this by locking the `mmap` mutex.
|
||||
unsafe fn get_vm_memory_definition(&self) -> NonNull<VMMemoryDefinition> {
|
||||
match &self.vm_memory_definition {
|
||||
VMMemoryDefinitionOwnership::VMOwned(ptr) => ptr.clone(),
|
||||
VMMemoryDefinitionOwnership::VMOwned(ptr) => *ptr,
|
||||
VMMemoryDefinitionOwnership::HostOwned(boxed_ptr) => {
|
||||
NonNull::new_unchecked(boxed_ptr.get())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user