...
This commit is contained in:
parent
5547b5d422
commit
50422fb343
1 changed files with 4 additions and 4 deletions
|
@ -77,7 +77,7 @@ fn calculate_votes(mut que: Vec<Box<[u8]>>) -> Vec<BTreeMap<Box<[u8]>, VoteEntry
|
|||
|
||||
// handle all items in this level
|
||||
for j in i.keys() {
|
||||
assert_eq!(lid, sum(&j[..]));
|
||||
debug_assert_eq!(lid, sum(&j[..]));
|
||||
for_each_parent(j, |k| {
|
||||
que.push(k.to_owned().into_boxed_slice());
|
||||
});
|
||||
|
@ -112,10 +112,10 @@ fn calculate_votes(mut que: Vec<Box<[u8]>>) -> Vec<BTreeMap<Box<[u8]>, VoteEntry
|
|||
.enumerate()
|
||||
.filter(|(_, i)| *i > 0);
|
||||
let pbs_index = pbsi.next().unwrap();
|
||||
assert_eq!(pbsi.next(), None);
|
||||
debug_assert_eq!(pbsi.next(), None);
|
||||
pbs_index
|
||||
};
|
||||
assert_eq!(pbs_index.1, 1);
|
||||
debug_assert_eq!(pbs_index.1, 1);
|
||||
|
||||
v.best_parent = pbs_index.0.try_into().unwrap();
|
||||
|
||||
|
@ -187,7 +187,7 @@ mod tests {
|
|||
#[test]
|
||||
fn test_large_links() {
|
||||
calculate_votes(vec![
|
||||
vec![255, 255, 255, 255].into_boxed_slice(),
|
||||
vec![255, 255, 255].into_boxed_slice(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue