We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 45e80be commit f7797a2Copy full SHA for f7797a2
lib/vm/src/memory.rs
@@ -389,19 +389,19 @@ impl From<VMOwnedMemory> for VMMemory {
389
}
390
391
392
-impl Into<VMMemory> for VMSharedMemory {
393
- fn into(self) -> VMMemory {
394
- VMMemory(Box::new(self))
+impl From<VMSharedMemory> for VMMemory {
+ fn from(mem: VMSharedMemory) -> Self {
+ Self(Box::new(mem))
395
396
397
398
/// Represents linear memory that can be either owned or shared
399
#[derive(Debug)]
400
pub struct VMMemory(pub Box<dyn LinearMemory + 'static>);
401
402
-impl Into<VMMemory> for Box<dyn LinearMemory + 'static> {
403
404
- VMMemory(self)
+impl From<Box<dyn LinearMemory + 'static>> for VMMemory {
+ fn from(mem: Box<dyn LinearMemory + 'static>) -> Self {
+ Self(mem)
405
406
407
0 commit comments