fix no-std builds.

This commit is contained in:
Sébastien Crozet 2023-11-12 23:17:17 +01:00
parent 0887b875a5
commit 06b8d38970

View File

@ -34,7 +34,7 @@ pub struct VecStorage<T, R: Dim, C: Dim> {
impl<T> Default for VecStorage<T, Dyn, Dyn> { impl<T> Default for VecStorage<T, Dyn, Dyn> {
fn default() -> Self { fn default() -> Self {
Self { Self {
data: vec![], data: Vec::new(),
nrows: Dyn::from_usize(0), nrows: Dyn::from_usize(0),
ncols: Dyn::from_usize(0), ncols: Dyn::from_usize(0),
} }
@ -44,7 +44,7 @@ impl<T> Default for VecStorage<T, Dyn, Dyn> {
impl<T, R: DimName> Default for VecStorage<T, R, Dyn> { impl<T, R: DimName> Default for VecStorage<T, R, Dyn> {
fn default() -> Self { fn default() -> Self {
Self { Self {
data: vec![], data: Vec::new(),
nrows: R::name(), nrows: R::name(),
ncols: Dyn::from_usize(0), ncols: Dyn::from_usize(0),
} }
@ -54,7 +54,7 @@ impl<T, R: DimName> Default for VecStorage<T, R, Dyn> {
impl<T, C: DimName> Default for VecStorage<T, Dyn, C> { impl<T, C: DimName> Default for VecStorage<T, Dyn, C> {
fn default() -> Self { fn default() -> Self {
Self { Self {
data: vec![], data: Vec::new(),
nrows: Dyn::from_usize(0), nrows: Dyn::from_usize(0),
ncols: C::name(), ncols: C::name(),
} }