Update to the last rust-nightly.

Version of rustc: 0.13.0-nightly (3327ecca4 2014-11-01 22:41:48 +0000).
This commit is contained in:
Sébastien Crozet 2014-11-02 22:47:11 +01:00
parent eb745df4bc
commit 3834913402
3 changed files with 9 additions and 11 deletions

View File

@ -57,6 +57,11 @@ impl<N> DVec<N> {
pub fn from_fn(dim: uint, f: |uint| -> N) -> DVec<N> { pub fn from_fn(dim: uint, f: |uint| -> N) -> DVec<N> {
DVec { at: Vec::from_fn(dim, |i| f(i)) } DVec { at: Vec::from_fn(dim, |i| f(i)) }
} }
#[inline]
pub fn len(&self) -> uint {
self.at.len()
}
} }
impl<N> FromIterator<N> for DVec<N> { impl<N> FromIterator<N> for DVec<N> {
@ -73,13 +78,6 @@ impl<N> FromIterator<N> for DVec<N> {
} }
impl<N> Collection for DVec<N> {
#[inline]
fn len(&self) -> uint {
self.at.len()
}
}
dvec_impl!(DVec, DVecMulRhs, DVecDivRhs, DVecAddRhs, DVecSubRhs) dvec_impl!(DVec, DVecMulRhs, DVecDivRhs, DVecAddRhs, DVecSubRhs)
/// Stack-allocated, dynamically sized vector with a maximum size of 1. /// Stack-allocated, dynamically sized vector with a maximum size of 1.

View File

@ -377,9 +377,9 @@ macro_rules! dvec_scalar_sub_impl (
macro_rules! small_dvec_impl ( macro_rules! small_dvec_impl (
($dvec: ident, $dim: expr, $mul: ident, $div: ident, $add: ident, $sub: ident $(,$idx: expr)*) => ( ($dvec: ident, $dim: expr, $mul: ident, $div: ident, $add: ident, $sub: ident $(,$idx: expr)*) => (
impl<N> Collection for $dvec<N> { impl<N> $dvec<N> {
#[inline] #[inline]
fn len(&self) -> uint { pub fn len(&self) -> uint {
self.dim self.dim
} }
} }

View File

@ -282,9 +282,9 @@ macro_rules! dim_impl(
macro_rules! container_impl( macro_rules! container_impl(
($t: ident) => ( ($t: ident) => (
impl<N> Collection for $t<N> { impl<N> $t<N> {
#[inline] #[inline]
fn len(&self) -> uint { pub fn len(&self) -> uint {
Dim::dim(None::<$t<N>>) Dim::dim(None::<$t<N>>)
} }
} }