impl {i,u}{8,16,32,64,size}
This commit is contained in:
parent
8afcaabee3
commit
3ff84fc5fd
9 changed files with 1004 additions and 3 deletions
|
|
@ -123,7 +123,7 @@ impl<'a, T: Clone> WeightedChoice<'a, T> {
|
|||
// strictly speaking, this is subsumed by the total weight == 0 case
|
||||
assert!(!items.is_empty(), "WeightedChoice::new called with no items");
|
||||
|
||||
let mut running_total = 0;
|
||||
let mut running_total = 0_usize;
|
||||
|
||||
// we convert the list from individual weights to cumulative
|
||||
// weights so we can binary search. This *could* drop elements
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue