From 2b210480bbb357a12eb81370bb7eea8905387218 Mon Sep 17 00:00:00 2001 From: pradeep Date: Fri, 24 Feb 2017 12:39:03 +0530 Subject: [PATCH] Fix in {Op}Assign trait implementations for Array --- src/arith/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/arith/mod.rs b/src/arith/mod.rs index 4426dc38f..7e77df60d 100644 --- a/src/arith/mod.rs +++ b/src/arith/mod.rs @@ -450,8 +450,9 @@ macro_rules! arith_assign_func { #[allow(unused_variables)] fn $fn_name(&mut self, rhs: Array) { let mut idxrs = Indexer::new(); - idxrs.set_index(&Seq::::default(), 0, Some(false)); - idxrs.set_index(&Seq::::default(), 1, Some(false)); + for n in 0..self.numdims() { + idxrs.set_index(&Seq::::default(), n, Some(false)); + } let tmp = assign_gen(self as &Array, &idxrs, & $func(self as &Array, &rhs, false)); mem::replace(self, tmp);