From c36416b9c0d2ae4895e6ca6b3d091b1a00398dec Mon Sep 17 00:00:00 2001 From: Jack Wrenn Date: Sat, 17 Nov 2018 12:13:03 -0500 Subject: [PATCH] Add `ShapeConstraint` for `Extend>` implementations. --- src/base/edition.rs | 3 ++- src/base/matrix_vec.rs | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/base/edition.rs b/src/base/edition.rs index 28230752..445a4ffd 100644 --- a/src/base/edition.rs +++ b/src/base/edition.rs @@ -779,7 +779,8 @@ where R: Dim, S: Extend>, RV: Dim, - SV: Storage + SV: Storage, + ShapeConstraint: SameNumberOfRows, { /// Extends the number of columns of a `Matrix` with `Vector`s /// from a given iterator. diff --git a/src/base/matrix_vec.rs b/src/base/matrix_vec.rs index 080ce16e..761e7fa2 100644 --- a/src/base/matrix_vec.rs +++ b/src/base/matrix_vec.rs @@ -10,6 +10,7 @@ use base::default_allocator::DefaultAllocator; use base::dimension::{Dim, DimName, Dynamic, U1}; use base::storage::{ContiguousStorage, ContiguousStorageMut, Owned, Storage, StorageMut}; use base::{Scalar, Vector}; +use base::constraint::{SameNumberOfRows, ShapeConstraint}; #[cfg(feature = "abomonation-serialize")] use abomonation::Abomonation; @@ -264,7 +265,8 @@ where N: Scalar, R: Dim, RV: Dim, - SV: Storage + SV: Storage, + ShapeConstraint: SameNumberOfRows, { /// Extends the number of columns of the `MatrixVec` with vectors /// from the given iterator.