Remove zero from the Index trait

This commit is contained in:
bluss
2015-09-18 00:53:19 +02:00
parent 6af588cb2c
commit 90de29e6cb
2 changed files with 2 additions and 7 deletions
+2 -2
View File
@@ -96,7 +96,7 @@ impl<A: Array> ArrayVec<A> {
/// ```
pub fn new() -> ArrayVec<A> {
unsafe {
ArrayVec { xs: NoDrop::new(new_array()), len: Index::zero() }
ArrayVec { xs: NoDrop::new(new_array()), len: Index::from(0) }
}
}
@@ -440,7 +440,7 @@ impl<A: Array> IntoIterator for ArrayVec<A> {
type Item = A::Item;
type IntoIter = IntoIter<A>;
fn into_iter(self) -> IntoIter<A> {
IntoIter { index: Index::zero(), v: self, }
IntoIter { index: Index::from(0), v: self, }
}
}