mirror of
https://github.com/mii443/wasmer.git
synced 2025-09-04 08:29:16 +00:00
Fixed clippy warning on using Self
This commit is contained in:
@ -453,7 +453,7 @@ impl VMMemory {
|
|||||||
///
|
///
|
||||||
/// This creates a `Memory` with owned metadata: this can be used to create a memory
|
/// This creates a `Memory` with owned metadata: this can be used to create a memory
|
||||||
/// that will be imported into Wasm modules.
|
/// 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 {
|
Ok(if memory.shared {
|
||||||
Self(Box::new(VMSharedMemory::new(memory, style)?))
|
Self(Box::new(VMSharedMemory::new(memory, style)?))
|
||||||
} else {
|
} else {
|
||||||
@ -477,7 +477,7 @@ impl VMMemory {
|
|||||||
memory: &MemoryType,
|
memory: &MemoryType,
|
||||||
style: &MemoryStyle,
|
style: &MemoryStyle,
|
||||||
vm_memory_location: NonNull<VMMemoryDefinition>,
|
vm_memory_location: NonNull<VMMemoryDefinition>,
|
||||||
) -> Result<VMMemory, MemoryError> {
|
) -> Result<Self, MemoryError> {
|
||||||
Ok(if memory.shared {
|
Ok(if memory.shared {
|
||||||
Self(Box::new(VMSharedMemory::from_definition(
|
Self(Box::new(VMSharedMemory::from_definition(
|
||||||
memory,
|
memory,
|
||||||
|
Reference in New Issue
Block a user