mirror of
https://github.com/cberner/raptorq.git
synced 2024-06-29 18:21:43 +00:00
Make assertions stricter in Enc[] implementation
This commit is contained in:
parent
cd4208e5c3
commit
a0e304a59d
@ -22,11 +22,12 @@ pub fn enc_indices(
|
||||
let p = pi_symbols;
|
||||
let (d, a, mut b, d1, a1, mut b1) = source_tuple;
|
||||
|
||||
assert!(d > 0);
|
||||
assert!(1 <= a && a < w);
|
||||
assert!(b < w);
|
||||
assert!(d1 == 2 || d1 == 3);
|
||||
assert!(1 <= a1 && a < w);
|
||||
assert!(b1 < w);
|
||||
assert!(1 <= a1 && a1 < p1);
|
||||
assert!(b1 < p1);
|
||||
|
||||
let mut indices = Vec::with_capacity((d + d1) as usize);
|
||||
indices.push(b as usize);
|
||||
|
Loading…
Reference in New Issue
Block a user