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
-5
View File
@@ -15,14 +15,11 @@ pub unsafe trait Array {
}
pub trait Index : PartialEq + Copy {
fn zero() -> Self;
fn to_usize(self) -> usize;
fn from(usize) -> Self;
}
impl Index for u8 {
#[inline(always)]
fn zero() -> Self { 0 }
#[inline(always)]
fn to_usize(self) -> usize { self as usize }
#[inline(always)]
@@ -30,8 +27,6 @@ impl Index for u8 {
}
impl Index for u16 {
#[inline(always)]
fn zero() -> Self { 0 }
#[inline(always)]
fn to_usize(self) -> usize { self as usize }
#[inline(always)]