Remove the optional generic-array feature

- It can be added back later if needed
- A public dependency implies version coupling, and we can't afford to
  have it for a niche use case.
This commit is contained in:
bluss
2017-03-24 18:52:05 +01:00
parent e6c090de88
commit f65ea92da4
5 changed files with 1 additions and 56 deletions
-18
View File
@@ -32,24 +32,6 @@ pub trait ArrayExt : Array {
impl<A> ArrayExt for A where A: Array { }
#[cfg(feature = "use_generic_array")]
unsafe impl<T, U> Array for ::generic_array::GenericArray<T, U>
where U: ::generic_array::ArrayLength<T>
{
type Item = T;
type Index = usize;
fn as_ptr(&self) -> *const Self::Item {
(**self).as_ptr()
}
fn as_mut_ptr(&mut self) -> *mut Self::Item {
(**self).as_mut_ptr()
}
fn capacity() -> usize {
U::to_usize()
}
}
impl Index for u8 {
#[inline(always)]
fn to_usize(self) -> usize { self as usize }