Fixed clippy warning on using Self

This commit is contained in:
ptitSeb
2022-09-07 10:36:44 +02:00
parent 516da67ce8
commit 04a03fc524

View File

@ -453,7 +453,7 @@ impl VMMemory {
///
/// This creates a `Memory` with owned metadata: this can be used to create a memory
/// that will be imported into Wasm modules.
pub fn new(memory: &MemoryType, style: &MemoryStyle) -> Result<VMMemory, MemoryError> {
pub fn new(memory: &MemoryType, style: &MemoryStyle) -> Result<Self, MemoryError> {
Ok(if memory.shared {
Self(Box::new(VMSharedMemory::new(memory, style)?))
} else {
@ -477,7 +477,7 @@ impl VMMemory {
memory: &MemoryType,
style: &MemoryStyle,
vm_memory_location: NonNull<VMMemoryDefinition>,
) -> Result<VMMemory, MemoryError> {
) -> Result<Self, MemoryError> {
Ok(if memory.shared {
Self(Box::new(VMSharedMemory::from_definition(
memory,