Skip to content
This repository was archived by the owner on Mar 11, 2024. It is now read-only.

Commit

Permalink
refactor(share): fixed recursion of to_bytes
Browse files Browse the repository at this point in the history
Signed-off-by: Berend Sliedrecht <[email protected]>
  • Loading branch information
berendsliedrecht authored and brentzundel committed Aug 4, 2022
1 parent a3d38a3 commit daf3d29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ursa_sharing/src/shamir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ impl Share {

/// Output the share value and the identifier.
/// The identifier is the first 4 bytes
pub fn to_bytes(&self) -> Vec<u8> {
pub fn to_bytes(&mut self) -> Vec<u8> {
let mut o = self.identifier.to_be_bytes().to_vec();
o.append(&mut self.to_bytes());
o.append(&mut self.value);
o
}

Expand Down

0 comments on commit daf3d29

Please sign in to comment.