Skip to content

Commit aa1a49c

Browse files
committed
New modifications
1 parent 830d32b commit aa1a49c

21 files changed

+2681
-2385
lines changed

.travis.yml

+7-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
language: rust
22
rust:
3-
- 1.20.0
3+
#- 1.36.0
44
- nightly
55
- beta
6-
- stable
7-
script: |
8-
cargo build --verbose &&
9-
cargo test --verbose &&
10-
cargo test --verbose --features serde &&
11-
([ $TRAVIS_RUST_VERSION != nightly ] || cargo check --verbose --no-default-features) &&
12-
([ $TRAVIS_RUST_VERSION != nightly ] || cargo test --verbose --features union) &&
13-
([ $TRAVIS_RUST_VERSION != nightly ] || cargo test --verbose --all-features) &&
14-
([ $TRAVIS_RUST_VERSION != nightly ] || cargo bench --verbose bench)
6+
#- stable
7+
script:
8+
- pushd ./scripts
9+
- ./test-stable.sh
10+
- ([ $TRAVIS_RUST_VERSION != nightly ] || ./test-nightly.sh
11+
- popd

Cargo.toml

+13-14
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
[package]
2-
name = "smallvec"
3-
version = "0.6.10"
42
authors = ["Simon Sapin <[email protected]>"]
5-
license = "MIT/Apache-2.0"
6-
repository = "https://github.com/servo/rust-smallvec"
3+
categories = ["data-structures"]
74
description = "'Small vector' optimization: store up to a small number of items on the stack"
5+
documentation = "https://doc.servo.org/smallvec/"
6+
edition = "2018"
87
keywords = ["small", "vec", "vector", "stack", "no_std"]
9-
categories = ["data-structures"]
8+
license = "MIT/Apache-2.0"
9+
name = "smallvec"
1010
readme = "README.md"
11-
documentation = "https://doc.servo.org/smallvec/"
11+
repository = "https://github.com/servo/rust-smallvec"
12+
version = "0.6.10"
1213

1314
[features]
14-
std = []
15-
union = []
16-
default = ["std"]
17-
specialization = []
15+
alloc = []
16+
const_generics = []
17+
default = ["alloc"]
1818
may_dangle = []
19-
20-
[lib]
21-
name = "smallvec"
22-
path = "lib.rs"
19+
specialization = []
20+
std = ["alloc"]
21+
union = []
2322

2423
[dependencies]
2524
serde = { version = "1", optional = true }

benches/bench.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,11 @@ fn bench_insert_from_slice(b: &mut Bencher) {
273273
#[bench]
274274
fn bench_macro_from_list(b: &mut Bencher) {
275275
b.iter(|| {
276-
let vec: SmallVec<[u64; 16]> = smallvec![
276+
#[cfg(feature = "const_generics")]
277+
let vec: SmallVec<u64, 16>;
278+
#[cfg(not(feature = "const_generics"))]
279+
let vec: SmallVec<[u64; 16]>;
280+
vec = smallvec![
277281
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20, 24, 32, 36, 0x40, 0x80,
278282
0x100, 0x200, 0x400, 0x800, 0x1000, 0x2000, 0x4000, 0x8000, 0x10000, 0x20000, 0x40000,
279283
0x80000, 0x100000,

0 commit comments

Comments
 (0)