impl {i,u}{8,16,32,64,size}

This commit is contained in:
Jorge Aparicio 2015-03-10 23:13:40 -05:00
parent 8afcaabee3
commit 3ff84fc5fd
9 changed files with 1004 additions and 3 deletions

View file

@ -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