diff --git a/src/polynomials.rs b/src/polynomials.rs index 0e3592e..30b0272 100644 --- a/src/polynomials.rs +++ b/src/polynomials.rs @@ -57,6 +57,8 @@ impl Default for Poly { impl Poly { // Sets self to self + x + // The coeffs of self and x should be small enough that no overflow can occur. + // If in doubt, reduce first. // Example: // ``` // let new_poly = poly1.add(&poly2); @@ -313,7 +315,7 @@ impl Poly { buf_chunk.copy_from_slice( &t.chunks_exact(2) .map(|chunk| chunk[0] | (chunk[1] << 4)) - .collect::>() + .collect::>() .into_inner(), ); } @@ -350,7 +352,7 @@ impl Poly { // poly will NOT be normalised, but 0 <= coeffs < 4096 // Example: // ``` - // unpacked_poly = unpack_to_poly(buf); + // unpacked_poly = Poly::unpack(buf); // ``` pub fn unpack(buf: &[u8]) -> Result, PackingError> { if buf.len() != POLYBYTES {