Explorar o código

Try to fix build on Rust 1.8

Vinzent Steinberg %!s(int64=8) %!d(string=hai) anos
pai
achega
c408bd6605
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      integer/src/lib.rs

+ 1 - 1
integer/src/lib.rs

@@ -800,7 +800,7 @@ fn test_binomial() {
 fn test_multinomial() {
     macro_rules! check_binomial {
         ($t:ty, $k:expr) => { {
-            let n: $t = $k.iter().sum();
+            let n: $t = $k.iter().fold(0, |acc, &x| acc + x);
             let k: &[$t] = $k;
             assert_eq!(k.len(), 2);
             assert_eq!(multinomial(k), binomial(n, k[0]));