Skip to content

Commit

Permalink
SFT-2878: improved error print
Browse files Browse the repository at this point in the history
  • Loading branch information
mjg-foundation committed Oct 24, 2023
1 parent bfe243a commit 73a002f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ur/src/fountain/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,10 @@ impl<'a, T: Types> BaseEncoder<'a, T> {
self.checksum = CRC32.checksum(message);
self.current_sequence = 0;

println!("{self.fragment_length}, {message.len()}, {max_fragment_len}, {self.data.len()}");

self.data.clear();
self.data
.try_resize(self.fragment_length, 0)
.expect("not enough capacity for part data");
.expect(&format!("fragment_len: {}, message.len(): {}, max_fragment_len: {}", self.fragment_len, message.len(), max_fragment_len));
}

/// Returns the current count of how many parts have been emitted.
Expand Down

0 comments on commit 73a002f

Please sign in to comment.