parent
f14f240aa7
commit
d368270ebc
|
@ -68,14 +68,8 @@ impl<N> DVec<N> {
|
|||
|
||||
impl<N> FromIterator<N> for DVec<N> {
|
||||
#[inline]
|
||||
fn from_iter<I: Iterator<Item = N>>(mut param: I) -> DVec<N> {
|
||||
let mut res = DVec { at: Vec::new() };
|
||||
|
||||
for e in param {
|
||||
res.at.push(e)
|
||||
}
|
||||
|
||||
res
|
||||
fn from_iter<I: Iterator<Item = N>>(param: I) -> DVec<N> {
|
||||
DVec { at: param.collect() }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -497,7 +497,7 @@ macro_rules! small_dvec_from_impl (
|
|||
|
||||
impl<N: Zero> FromIterator<N> for $dvec<N> {
|
||||
#[inline]
|
||||
fn from_iter<I: Iterator<Item = N>>(mut param: I) -> $dvec<N> {
|
||||
fn from_iter<I: Iterator<Item = N>>(param: I) -> $dvec<N> {
|
||||
let mut at: [N; $dim] = [ $( $zeros, )* ];
|
||||
|
||||
let mut dim = 0;
|
||||
|
|
Loading…
Reference in New Issue