diff -r e7920e205785 -r bea0c3841ced src/direct_product.rs --- 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, Q: Decomposition, { - type OwnedInstance = Pair; - type Decomposition<'b> = Pair, Q::Decomposition<'b>> where @@ -443,7 +449,7 @@ } #[inline] - fn cow<'b>(self) -> MyCow<'b, Pair> + fn cow<'b>(self) -> MyCow<'b, Pair> where Self: 'b, { @@ -451,7 +457,7 @@ } #[inline] - fn own(self) -> Pair { + fn own(self) -> Pair { Pair(self.0.own(), self.1.own()) } } @@ -494,7 +500,7 @@ } #[inline] - fn cow<'b>(self) -> MyCow<'b, Pair> + fn cow<'b>(self) -> MyCow<'b, Pair> where Self: 'b, { @@ -502,7 +508,7 @@ } #[inline] - fn own(self) -> Pair { + fn own(self) -> Pair { let Pair(ref u, ref v) = self; Pair(u.own(), v.own()) }