cargo clippy --fix

This commit is contained in:
Felix Schütt
2022-10-14 13:00:45 +02:00
parent ace2d9f329
commit 67d650146c
7 changed files with 35 additions and 35 deletions

View File

@@ -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()
}