Fix FromIterator impl.
This commit is contained in:
parent
5187a1a73f
commit
61e985634b
|
@ -46,8 +46,8 @@ impl<N> IterableMut<N> for DVec<N> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<N, Iter: Iterator<N>> FromIterator<N, Iter> for DVec<N> {
|
impl<N> FromIterator<N> for DVec<N> {
|
||||||
fn from_iterator(mut param: &mut Iter) -> DVec<N> {
|
fn from_iterator<I: Iterator<N>>(mut param: &mut I) -> DVec<N> {
|
||||||
let mut res = DVec { at: ~[] };
|
let mut res = DVec { at: ~[] };
|
||||||
|
|
||||||
for e in param {
|
for e in param {
|
||||||
|
|
|
@ -231,9 +231,9 @@ impl<N: Clone + One> One for vec::Vec0<N> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<N, Iter: Iterator<N>> FromIterator<N, Iter> for vec::Vec0<N> {
|
impl<N> FromIterator<N> for vec::Vec0<N> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn from_iterator(_: &mut Iter) -> vec::Vec0<N> {
|
fn from_iterator<I: Iterator<N>>(_: &mut I) -> vec::Vec0<N> {
|
||||||
vec::Vec0
|
vec::Vec0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -480,9 +480,9 @@ macro_rules! one_impl(
|
||||||
|
|
||||||
macro_rules! from_iterator_impl(
|
macro_rules! from_iterator_impl(
|
||||||
($t: ident, $param0: ident $(, $paramN: ident)*) => (
|
($t: ident, $param0: ident $(, $paramN: ident)*) => (
|
||||||
impl<N, Iter: Iterator<N>> FromIterator<N, Iter> for $t<N> {
|
impl<N> FromIterator<N> for $t<N> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn from_iterator($param0: &mut Iter) -> $t<N> {
|
fn from_iterator<I: Iterator<N>>($param0: &mut I) -> $t<N> {
|
||||||
$t::new($param0.next().unwrap() $(, $paramN.next().unwrap())*)
|
$t::new($param0.next().unwrap() $(, $paramN.next().unwrap())*)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue