mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-06 20:58:28 +00:00
cargo clippy --fix
This commit is contained in:
@@ -357,7 +357,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(Self(Box::new(VMOwnedMemory::new(memory, style)?)))
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ impl VMMemory {
|
||||
memory: &MemoryType,
|
||||
style: &MemoryStyle,
|
||||
vm_memory_location: NonNull<VMMemoryDefinition>,
|
||||
) -> Result<VMMemory, MemoryError> {
|
||||
) -> Result<Self, MemoryError> {
|
||||
Ok(Self(Box::new(VMOwnedMemory::from_definition(
|
||||
memory,
|
||||
style,
|
||||
@@ -384,9 +384,9 @@ impl VMMemory {
|
||||
/// are natively supported
|
||||
/// - VMOwnedMemory -> VMMemory
|
||||
/// - Box<dyn LinearMemory + 'static> -> VMMemory
|
||||
pub fn from_custom<IntoVMMemory>(memory: IntoVMMemory) -> VMMemory
|
||||
pub fn from_custom<IntoVMMemory>(memory: IntoVMMemory) -> Self
|
||||
where
|
||||
IntoVMMemory: Into<VMMemory>,
|
||||
IntoVMMemory: Into<Self>,
|
||||
{
|
||||
memory.into()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user