]> git.proxmox.com Git - rustc.git/blobdiff - src/librand/distributions/mod.rs
Imported Upstream version 1.6.0+dfsg1
[rustc.git] / src / librand / distributions / mod.rs
index 4c62e1a350406ecd475d81ddebd838f466995b1f..a54c8df2352ac363b6ac519d350bb651cf2ed0b2 100644 (file)
@@ -118,8 +118,10 @@ impl<'a, T: Clone> WeightedChoice<'a, T> {
         for item in &mut *items {
             running_total = match running_total.checked_add(item.weight) {
                 Some(n) => n,
-                None => panic!("WeightedChoice::new called with a total weight larger than a \
-                                usize can contain"),
+                None => {
+                    panic!("WeightedChoice::new called with a total weight larger than a usize \
+                            can contain")
+                }
             };
 
             item.weight = running_total;
@@ -199,7 +201,6 @@ mod ziggurat_tables;
 /// * `pdf`: the probability density function
 /// * `zero_case`: manual sampling from the tail when we chose the
 ///    bottom box (i.e. i == 0)
-
 // the perf improvement (25-50%) is definitely worth the extra code
 // size from force-inlining.
 #[inline(always)]