Rename "unstable" feature to "bench".
Benchmarking is the only thing that requires unstable Rust in the library any more. Yay!
This commit is contained in:
parent
548ee2a5f2
commit
016d324c51
|
@ -11,4 +11,4 @@ keywords = ["container", "data-structure", "map"]
|
||||||
license = "MIT/Apache-2.0"
|
license = "MIT/Apache-2.0"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
unstable = []
|
bench = []
|
||||||
|
|
10
src/lib.rs
10
src/lib.rs
|
@ -1,9 +1,9 @@
|
||||||
//! This crate provides the `AnyMap` type, a safe and convenient store for one value of each type.
|
//! This crate provides the `AnyMap` type, a safe and convenient store for one value of each type.
|
||||||
|
|
||||||
#![cfg_attr(all(feature = "unstable", test), feature(test))]
|
#![cfg_attr(all(feature = "bench", test), feature(test))]
|
||||||
#![warn(missing_docs, unused_results)]
|
#![warn(missing_docs, unused_results)]
|
||||||
|
|
||||||
#[cfg(all(feature = "unstable", test))]
|
#[cfg(all(feature = "bench", test))]
|
||||||
extern crate test;
|
extern crate test;
|
||||||
|
|
||||||
use std::any::TypeId;
|
use std::any::TypeId;
|
||||||
|
@ -289,7 +289,7 @@ impl<'a, A: ?Sized + UncheckedAnyExt, V: IntoBox<A>> VacantEntry<'a, A, V> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "unstable")]
|
#[cfg(feature = "bench")]
|
||||||
#[bench]
|
#[bench]
|
||||||
fn bench_insertion(b: &mut ::test::Bencher) {
|
fn bench_insertion(b: &mut ::test::Bencher) {
|
||||||
b.iter(|| {
|
b.iter(|| {
|
||||||
|
@ -300,7 +300,7 @@ fn bench_insertion(b: &mut ::test::Bencher) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "unstable")]
|
#[cfg(feature = "bench")]
|
||||||
#[bench]
|
#[bench]
|
||||||
fn bench_get_missing(b: &mut ::test::Bencher) {
|
fn bench_get_missing(b: &mut ::test::Bencher) {
|
||||||
b.iter(|| {
|
b.iter(|| {
|
||||||
|
@ -311,7 +311,7 @@ fn bench_get_missing(b: &mut ::test::Bencher) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "unstable")]
|
#[cfg(feature = "bench")]
|
||||||
#[bench]
|
#[bench]
|
||||||
fn bench_get_present(b: &mut ::test::Bencher) {
|
fn bench_get_present(b: &mut ::test::Bencher) {
|
||||||
b.iter(|| {
|
b.iter(|| {
|
||||||
|
|
Loading…
Reference in a new issue