--- a/src/direct_product.rs Tue Sep 02 15:18:30 2025 -0500 +++ b/src/direct_product.rs Wed Sep 03 09:16:03 2025 -0500 @@ -275,10 +275,18 @@ Pair(self.0.into_owned(), self.1.into_owned()) } - /// Returns an owned instance of a reference. + #[inline] fn clone_owned(&self) -> Self::OwnedVariant { Pair(self.0.clone_owned(), self.1.clone_owned()) } + + #[inline] + fn cow_owned<'b>(self) -> MyCow<'b, Self::OwnedVariant> + where + Self: 'b, + { + MyCow::Owned(self.into_owned()) + } } /// We only support 'closed' `Euclidean` `Pair`s, as more general ones cause @@ -392,8 +400,6 @@ D: Decomposition<A>, Q: Decomposition<B>, { - type OwnedInstance = Pair<D::OwnedInstance, Q::OwnedInstance>; - type Decomposition<'b> = Pair<D::Decomposition<'b>, Q::Decomposition<'b>> where @@ -443,7 +449,7 @@ } #[inline] - fn cow<'b>(self) -> MyCow<'b, Pair<D::OwnedInstance, Q::OwnedInstance>> + fn cow<'b>(self) -> MyCow<'b, Pair<A::OwnedSpace, B::OwnedSpace>> where Self: 'b, { @@ -451,7 +457,7 @@ } #[inline] - fn own(self) -> Pair<D::OwnedInstance, Q::OwnedInstance> { + fn own(self) -> Pair<A::OwnedSpace, B::OwnedSpace> { Pair(self.0.own(), self.1.own()) } } @@ -494,7 +500,7 @@ } #[inline] - fn cow<'b>(self) -> MyCow<'b, Pair<D::OwnedInstance, Q::OwnedInstance>> + fn cow<'b>(self) -> MyCow<'b, Pair<A::OwnedSpace, B::OwnedSpace>> where Self: 'b, { @@ -502,7 +508,7 @@ } #[inline] - fn own(self) -> Pair<D::OwnedInstance, Q::OwnedInstance> { + fn own(self) -> Pair<A::OwnedSpace, B::OwnedSpace> { let Pair(ref u, ref v) = self; Pair(u.own(), v.own()) }