finalized from_bytes change
Jean-Philippe Bossuat jeanphilippe.bossuat@gmail.com
Fri, 14 Feb 2025 18:41:54 +0100
1 files changed,
7 insertions(+),
7 deletions(-)
jump to
M
base2k/src/vec_znx.rs
→
base2k/src/vec_znx.rs
@@ -32,13 +32,13 @@ pub data: *mut i64,
} impl VecZnxBorrow { - /// Returns a new struct implementing [VecZnxApi] with the provided data as backing array. + /// Returns a new struct implementing [VecZnxBorrow] with the provided data as backing array. /// - /// The struct will take ownership of buf[..[VecZnx::bytes_of]] + /// The struct will *NOT* take ownership of buf[..[VecZnx::bytes_of]] /// /// User must ensure that data is properly alligned and that - /// the size of data is at least equal to [Module::bytes_of_vec_znx]. - pub fn from_bytes(n: usize, limbs: usize, bytes: &mut [u8]) -> impl VecZnxApi { + /// the size of data is at least equal to [VecZnx::bytes_of]. + pub fn from_bytes(n: usize, limbs: usize, bytes: &mut [u8]) -> VecZnxBorrow { let size = Self::bytes_of(n, limbs); assert!( bytes.len() >= size,@@ -118,13 +118,13 @@ }
} impl VecZnx { - /// Returns a new struct implementing [VecZnxApi] with the provided data as backing array. + /// Returns a new struct implementing [VecZnx] with the provided data as backing array. /// /// The struct will take ownership of buf[..[VecZnx::bytes_of]] /// /// User must ensure that data is properly alligned and that - /// the size of data is at least equal to [Module::bytes_of_vec_znx]. - pub fn from_bytes(n: usize, limbs: usize, buf: &mut [u8]) -> impl VecZnxApi { + /// the size of data is at least equal to [VecZnx::bytes_of]. + pub fn from_bytes(n: usize, limbs: usize, buf: &mut [u8]) -> VecZnx { let size = Self::bytes_of(n, limbs); assert!( buf.len() >= size,