]> git.lizzy.rs Git - rust.git/blobdiff - src/librand/distributions/mod.rs
Auto merge of #43710 - zackmdavis:field_init_shorthand_power_slam, r=Mark-Simulacrum
[rust.git] / src / librand / distributions / mod.rs
index 67b9449981e0f02a4d24fa5adfb3928ec612665c..47967a719d397a8972d39bf4e90ac356721af550 100644 (file)
@@ -149,7 +149,7 @@ pub fn new(items: &'a mut [Weighted<T>]) -> 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),