Skip to content

Commit

Permalink
[❄] Make point_polynomial return a slice
Browse files Browse the repository at this point in the history
No need to clone here
  • Loading branch information
LLFourn committed Jul 31, 2024
1 parent 0b77f41 commit e2cffda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions schnorr_fun/src/frost/shared_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ impl<T: PointType, Z: ZeroChoice> SharedKey<T, Z> {
/// To get the first coefficient of the polynomial typed correctly call [`public_key`].
///
/// [`public_key`]: Self::public_key
pub fn point_polynomial(&self) -> Vec<Point<Normal, Public, Zero>> {
self.point_polynomial.clone()
pub fn point_polynomial(&self) -> &[Point<Normal, Public, Zero>] {
&self.point_polynomial
}

/// ☠ Type unsafe: you have to make sure the polynomial fits the type parameters
Expand Down

0 comments on commit e2cffda

Please sign in to comment.