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:
parent
eb745df4bc
commit
3834913402
|
@ -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.
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>>)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue