some fixes

This commit is contained in:
Jean-Philippe Bossuat
2025-05-22 17:40:01 +02:00
parent 3084978976
commit 43c7f21033
4 changed files with 73 additions and 21 deletions

View File

@@ -371,3 +371,19 @@ impl VecZnxToRef for VecZnx<&[u8]> {
}
}
}
impl<DataSelf> VecZnx<DataSelf>
where
VecZnx<DataSelf>: VecZnxToRef,
{
pub fn clone(&self) -> VecZnx<Vec<u8>> {
let self_ref: VecZnx<&[u8]> = self.to_ref();
VecZnx {
data: self_ref.data.to_vec(),
n: self_ref.n,
cols: self_ref.cols,
size: self_ref.size,
}
}
}