mirror of
https://github.com/mii443/wasmer.git
synced 2025-08-30 20:29:31 +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
|
||||
/// 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,
|
||||
|
Reference in New Issue
Block a user