From 414fe8afda4f07bfc6808741ca1c5a5a7579b7d7 Mon Sep 17 00:00:00 2001 From: sebcrozet Date: Sun, 9 Dec 2018 17:00:56 +0100 Subject: [PATCH] Pass references to zip_apply and zip_zip_apply. --- src/base/matrix.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/matrix.rs b/src/base/matrix.rs index 3d12c12b..61434bb9 100644 --- a/src/base/matrix.rs +++ b/src/base/matrix.rs @@ -722,7 +722,7 @@ impl> Matrix { /// Replaces each component of `self` by the result of a closure `f` applied on its components /// joined with the components from `rhs`. #[inline] - pub fn zip_apply(&mut self, rhs: Matrix, mut f: impl FnMut(N, N2) -> N) + pub fn zip_apply(&mut self, rhs: &Matrix, mut f: impl FnMut(N, N2) -> N) where N2: Scalar, R2: Dim, C2: Dim, @@ -750,7 +750,7 @@ impl> Matrix { /// Replaces each component of `self` by the result of a closure `f` applied on its components /// joined with the components from `b` and `c`. #[inline] - pub fn zip_zip_apply(&mut self, b: Matrix, c: Matrix, mut f: impl FnMut(N, N2, N3) -> N) + pub fn zip_zip_apply(&mut self, b: &Matrix, c: &Matrix, mut f: impl FnMut(N, N2, N3) -> N) where N2: Scalar, R2: Dim, C2: Dim,