Evan Almloff преди 2 години
родител
ревизия
6a46a7c4fb
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 6 0
      packages/core/src/nodes.rs

+ 6 - 0
packages/core/src/nodes.rs

@@ -103,6 +103,12 @@ impl BoxedCellSlice {
     }
     }
 
 
     pub fn transfer(&self, other: &Self) {
     pub fn transfer(&self, other: &Self) {
+        unsafe {
+            *self.0.get() = (*other.0.get()).clone();
+        }
+    }
+
+    pub fn take_from(&self, other: &Self) {
         unsafe {
         unsafe {
             *self.0.get() = (*other.0.get()).take();
             *self.0.get() = (*other.0.get()).take();
         }
         }