Skip to content

Commit f7797a2

Browse files
committed
Fixed clippy
1 parent 45e80be commit f7797a2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/vm/src/memory.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -389,19 +389,19 @@ impl From<VMOwnedMemory> for VMMemory {
389389
}
390390
}
391391

392-
impl Into<VMMemory> for VMSharedMemory {
393-
fn into(self) -> VMMemory {
394-
VMMemory(Box::new(self))
392+
impl From<VMSharedMemory> for VMMemory {
393+
fn from(mem: VMSharedMemory) -> Self {
394+
Self(Box::new(mem))
395395
}
396396
}
397397

398398
/// Represents linear memory that can be either owned or shared
399399
#[derive(Debug)]
400400
pub struct VMMemory(pub Box<dyn LinearMemory + 'static>);
401401

402-
impl Into<VMMemory> for Box<dyn LinearMemory + 'static> {
403-
fn into(self) -> VMMemory {
404-
VMMemory(self)
402+
impl From<Box<dyn LinearMemory + 'static>> for VMMemory {
403+
fn from(mem: Box<dyn LinearMemory + 'static>) -> Self {
404+
Self(mem)
405405
}
406406
}
407407

0 commit comments

Comments
 (0)