Try to fix build on Rust 1.8

This commit is contained in:
Vinzent Steinberg 2017-03-17 18:21:06 +01:00
parent ebe3f85976
commit c408bd6605
1 changed files with 1 additions and 1 deletions

View File

@ -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]));