diff --git a/src/base/vec_storage.rs b/src/base/vec_storage.rs index a0230488..747e5179 100644 --- a/src/base/vec_storage.rs +++ b/src/base/vec_storage.rs @@ -268,6 +268,21 @@ impl Extend for VecStorage } } +impl<'a, N: 'a + Copy, R: Dim> Extend<&'a N> for VecStorage +{ + /// Extends the number of columns of the `VecStorage` with elements + /// from the given iterator. + /// + /// # Panics + /// This function panics if the number of elements yielded by the + /// given iterator is not a multiple of the number of rows of the + /// `VecStorage`. + fn extend>(&mut self, iter: I) + { + self.extend(iter.into_iter().copied()) + } +} + impl Extend> for VecStorage where N: Scalar + Copy,