Chris Morgan
›
Git
›
anymap
› commitdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
patch
|
inline
| side by side (from parent 1:
0ad7c30
)
commit
grep
author
committer
pickaxe
?
search:
re
Make tests work on beta/stable (benchmarks can’t work).
author
Chris Morgan
<me@chrismorgan.info>
Wed, 10 Jun 2015 09:26:10 +0000
committer
Chris Morgan
<me@chrismorgan.info>
Wed, 10 Jun 2015 09:26:10 +0000
src/lib.rs
patch
|
blob
|
history
diff --git
a/src/lib.rs
b/src/lib.rs
index b5ae44a59108ae5f447c8c16e9d120db4b4371bf..d856ea646c6c543916fb5294337c02e4072a2797 100644
(file)
--- a/
src/lib.rs
+++ b/
src/lib.rs
@@
-1,10
+1,10
@@
//! This crate provides the `AnyMap` type, a safe and convenient store for one value of each type.
#![cfg_attr(feature = "unstable", feature(core, std_misc))]
//! This crate provides the `AnyMap` type, a safe and convenient store for one value of each type.
#![cfg_attr(feature = "unstable", feature(core, std_misc))]
-#![cfg_attr(
test
, feature(test))]
+#![cfg_attr(
all(feature = "unstable", test)
, feature(test))]
#![warn(missing_docs, unused_results)]
#![warn(missing_docs, unused_results)]
-#[cfg(
test
)]
+#[cfg(
all(feature = "unstable", test)
)]
extern crate test;
use std::any::TypeId;
extern crate test;
use std::any::TypeId;
@@
-290,6
+290,7
@@
impl<'a, A: ?Sized + UncheckedAnyExt, V: IntoBox<A>> VacantEntry<'a, A, V> {
}
}
}
}
+#[cfg(feature = "unstable")]
#[bench]
fn bench_insertion(b: &mut ::test::Bencher) {
b.iter(|| {
#[bench]
fn bench_insertion(b: &mut ::test::Bencher) {
b.iter(|| {
@@
-300,6
+301,7
@@
fn bench_insertion(b: &mut ::test::Bencher) {
})
}
})
}
+#[cfg(feature = "unstable")]
#[bench]
fn bench_get_missing(b: &mut ::test::Bencher) {
b.iter(|| {
#[bench]
fn bench_get_missing(b: &mut ::test::Bencher) {
b.iter(|| {
@@
-310,6
+312,7
@@
fn bench_get_missing(b: &mut ::test::Bencher) {
})
}
})
}
+#[cfg(feature = "unstable")]
#[bench]
fn bench_get_present(b: &mut ::test::Bencher) {
b.iter(|| {
#[bench]
fn bench_get_present(b: &mut ::test::Bencher) {
b.iter(|| {