X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrand%2Fdistributions%2Fmod.rs;h=47967a719d397a8972d39bf4e90ac356721af550;hb=6f4ab9458a7ad06c8ce630604f533c8c0c0acef4;hp=67b9449981e0f02a4d24fa5adfb3928ec612665c;hpb=10fde3393be6295c8df2ce6c016f3f37b25b58b7;p=rust.git diff --git a/src/librand/distributions/mod.rs b/src/librand/distributions/mod.rs index 67b9449981e..47967a719d3 100644 --- a/src/librand/distributions/mod.rs +++ b/src/librand/distributions/mod.rs @@ -149,7 +149,7 @@ pub fn new(items: &'a mut [Weighted]) -> WeightedChoice<'a, T> { "WeightedChoice::new called with a total weight of 0"); WeightedChoice { - items: items, + items, // we're likely to be generating numbers in this range // relatively often, so might as well cache it weight_range: Range::new(0, running_total),