From 7a1a4bcc023a48ab1f331319e3c842c26e280df2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Tue, 3 Aug 2021 09:54:11 +0200 Subject: [PATCH] Fix test and no-std builds. --- src/base/blas.rs | 2 +- src/sparse/cs_matrix.rs | 1 + src/sparse/cs_matrix_ops.rs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/base/blas.rs b/src/base/blas.rs index c19011fd..4d5a5b5d 100644 --- a/src/base/blas.rs +++ b/src/base/blas.rs @@ -9,10 +9,10 @@ use crate::base::constraint::{ }; use crate::base::dimension::{Const, Dim, Dynamic, U1, U2, U3, U4}; use crate::base::storage::{Storage, StorageMut}; +use crate::base::uninit::Init; use crate::base::{ DVectorSlice, DefaultAllocator, Matrix, Scalar, SquareMatrix, Vector, VectorSlice, }; -use crate::core::uninit::Init; /// # Dot/scalar product impl> Matrix diff --git a/src/sparse/cs_matrix.rs b/src/sparse/cs_matrix.rs index c717e90e..bb9f50a0 100644 --- a/src/sparse/cs_matrix.rs +++ b/src/sparse/cs_matrix.rs @@ -466,6 +466,7 @@ where { pub(crate) fn sort(&mut self) where + T: Zero, DefaultAllocator: Allocator, { // Size = R diff --git a/src/sparse/cs_matrix_ops.rs b/src/sparse/cs_matrix_ops.rs index fba5d41b..419862a7 100644 --- a/src/sparse/cs_matrix_ops.rs +++ b/src/sparse/cs_matrix_ops.rs @@ -219,7 +219,7 @@ where impl<'a, 'b, T, R1, R2, C1, C2, S1, S2> Add<&'b CsMatrix> for &'a CsMatrix where - T: Scalar + ClosedAdd + ClosedMul + One, + T: Scalar + ClosedAdd + ClosedMul + Zero + One, R1: Dim, C1: Dim, R2: Dim,