Skip to content

Commit f65ea92

Browse files
committed
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.
1 parent e6c090d commit f65ea92

File tree

5 files changed

+1
-56
lines changed

5 files changed

+1
-56
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ matrix:
55
- rust: 1.12.0
66
- rust: stable
77
env:
8-
- FEATURES="use_generic_array"
98
- NODEFAULT=1
109
- rust: beta
1110
- rust: nightly
@@ -16,7 +15,7 @@ matrix:
1615
- NODROP_FEATURES='use_needs_drop'
1716
- rust: nightly
1817
env:
19-
- FEATURES='use_union use_generic_array'
18+
- FEATURES='use_union'
2019
- NODROP_FEATURES='use_union'
2120
branches:
2221
only:

Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,7 @@ version = "0.1.8"
1919
path = "nodrop"
2020
default-features = false
2121

22-
[dependencies.generic-array]
23-
version = "0.5.1"
24-
optional = true
25-
2622
[features]
2723
default = ["std"]
2824
std = ["odds/std", "nodrop/std"]
2925
use_union = ["nodrop/use_union"]
30-
use_generic_array = ["generic-array"]

src/array.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,6 @@ pub trait ArrayExt : Array {
3232

3333
impl<A> ArrayExt for A where A: Array { }
3434

35-
#[cfg(feature = "use_generic_array")]
36-
unsafe impl<T, U> Array for ::generic_array::GenericArray<T, U>
37-
where U: ::generic_array::ArrayLength<T>
38-
{
39-
type Item = T;
40-
type Index = usize;
41-
fn as_ptr(&self) -> *const Self::Item {
42-
(**self).as_ptr()
43-
}
44-
fn as_mut_ptr(&mut self) -> *mut Self::Item {
45-
(**self).as_mut_ptr()
46-
}
47-
fn capacity() -> usize {
48-
U::to_usize()
49-
}
50-
51-
}
52-
5335
impl Index for u8 {
5436
#[inline(always)]
5537
fn to_usize(self) -> usize { self as usize }

src/lib.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,11 @@
1414
//! - Use the unstable feature untagged unions for the internal implementation,
1515
//! which has reduced space overhead
1616
//!
17-
//! - `use_generic_array`
18-
//! - Optional
19-
//! - Requires Rust stable channel
20-
//! - Depend on generic-array and allow using it just like a fixed
21-
//! size array for ArrayVec storage.
2217
#![doc(html_root_url="https://docs.rs/arrayvec/0.3/")]
2318
#![cfg_attr(not(feature="std"), no_std)]
2419
extern crate odds;
2520
extern crate nodrop;
2621

27-
#[cfg(feature = "use_generic_array")]
28-
extern crate generic_array;
29-
3022
#[cfg(not(feature="std"))]
3123
extern crate core as std;
3224

tests/generic_array.rs

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)