Skip to content

Commit

Permalink
Enable from_{}_storage only when std/alloc available
Browse files Browse the repository at this point in the history
  • Loading branch information
Andlon committed May 7, 2021
1 parent 3a3bc55 commit 922393b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/base/matrix.rs
Expand Up @@ -29,7 +29,10 @@ use crate::base::storage::{
ContiguousStorage, ContiguousStorageMut, Owned, SameShapeStorage, Storage, StorageMut,
};
use crate::base::{Const, DefaultAllocator, OMatrix, OVector, Scalar, Unit};
use crate::{ArrayStorage, DMatrix, DVector, Dynamic, SMatrix, SimdComplexField, VecStorage};
use crate::{ArrayStorage, SMatrix, SimdComplexField};

#[cfg(any(feature = "std", feature = "alloc"))]
use crate::{DMatrix, DVector, Dynamic, VecStorage};

/// A square matrix.
pub type SquareMatrix<T, D, S> = Matrix<T, D, D, S>;
Expand Down Expand Up @@ -332,6 +335,7 @@ impl<T, const R: usize, const C: usize> SMatrix<T, R, C> {

// TODO: Consider removing/deprecating `from_vec_storage` once we are able to make
// `from_data` const fn compatible
#[cfg(any(feature = "std", feature = "alloc"))]
impl<T> DMatrix<T> {
/// Creates a new heap-allocated matrix from the given [VecStorage].
///
Expand All @@ -346,6 +350,7 @@ impl<T> DMatrix<T> {

// TODO: Consider removing/deprecating `from_vec_storage` once we are able to make
// `from_data` const fn compatible
#[cfg(any(feature = "std", feature = "alloc"))]
impl<T> DVector<T> {
/// Creates a new heap-allocated matrix from the given [VecStorage].
///
Expand Down

0 comments on commit 922393b

Please sign in to comment.