diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2015-03-10 23:13:40 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2015-03-16 21:57:42 -0500 |
| commit | 3ff84fc5fdd9509fc3ee4595fd76aa31d4815b2a (patch) | |
| tree | 3e60a6c33bf7a8abea171cae5168ebb13c3cd137 /src/librand | |
| parent | 8afcaabee32fb41eaf065041d7510c6762f12822 (diff) | |
| download | rust-3ff84fc5fdd9509fc3ee4595fd76aa31d4815b2a.tar.gz rust-3ff84fc5fdd9509fc3ee4595fd76aa31d4815b2a.zip | |
impl {i,u}{8,16,32,64,size}
Diffstat (limited to 'src/librand')
| -rw-r--r-- | src/librand/distributions/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librand/distributions/mod.rs b/src/librand/distributions/mod.rs index 79b176a4ffd..47bc2f5a113 100644 --- a/src/librand/distributions/mod.rs +++ b/src/librand/distributions/mod.rs @@ -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 |
