Why is Default
not implemented for VecStorage
?
#1226
Unanswered
Tastaturtaste
asked this question in
Q&A
Replies: 1 comment
-
For reference, the implementation I expected would look like this: impl<T, R: Dim, C: Dim> Default for VecStorage<T, R, C> {
fn default() -> Self {
Self {
data: Default::default(),
nrows: Dim::from_usize(0),
ncols: Dim::from_usize(0),
}
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My use case is moving a
DMatrix<f32>
out of a struct withstd::mem::take
. This does not work however, results in the following error:A quick look at the implementation of
VecStorage
makes it seem like it would be trivial to implementDefault
for it with an emptyVec
. Is there a specific reason this was not done already I don't know?Beta Was this translation helpful? Give feedback.
All reactions