src/bisection_tree/btfn.rs

branch
dev
changeset 162
bea0c3841ced
parent 150
c4e394a9c84c
child 164
fd9dba51afd3
--- a/src/bisection_tree/btfn.rs	Tue Sep 02 15:18:30 2025 -0500
+++ b/src/bisection_tree/btfn.rs	Wed Sep 03 09:16:03 2025 -0500
@@ -1,4 +1,4 @@
-use crate::instance::{ClosedSpace, Instance, Ownable, Space};
+use crate::instance::{ClosedSpace, Instance, MyCow, Ownable, Space};
 use crate::mapping::{BasicDecomposition, DifferentiableImpl, DifferentiableMapping, Mapping};
 use crate::types::Float;
 use numeric_literals::replace_float_literals;
@@ -48,10 +48,16 @@
         self
     }
 
-    /// Returns an owned instance of a reference.
     fn clone_owned(&self) -> Self::OwnedVariant {
         self.clone()
     }
+
+    fn cow_owned<'b>(self) -> MyCow<'b, Self::OwnedVariant>
+    where
+        Self: 'b,
+    {
+        MyCow::Owned(self)
+    }
 }
 
 impl<F: Float, G, BT, const N: usize> Space for BTFN<F, G, BT, N>

mercurial