diff --git a/src/lib.rs b/src/lib.rs index 708573e..2cb7b95 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -329,6 +329,7 @@ fn star() { assert_eq!(m.params, params("foo", "bar/foo")); } +#[cfg(test)] #[bench] fn benchmark(b: &mut test::Bencher) { let mut router = Router::new(); diff --git a/src/nfa.rs b/src/nfa.rs index afeba70..8ecc6dc 100644 --- a/src/nfa.rs +++ b/src/nfa.rs @@ -565,6 +565,7 @@ fn test_ascii_set() { assert!(!set.contains('ü'), "The set does not contain ü"); } +#[cfg(test)] #[bench] fn bench_char_set(b: &mut test::Bencher) { let mut set = CharSet::new(); @@ -579,6 +580,7 @@ fn bench_char_set(b: &mut test::Bencher) { }); } +#[cfg(test)] #[bench] fn bench_hash_set(b: &mut test::Bencher) { let mut set = HashSet::new(); @@ -593,6 +595,7 @@ fn bench_hash_set(b: &mut test::Bencher) { }); } +#[cfg(test)] #[bench] fn bench_btree_set(b: &mut test::Bencher) { let mut set = BTreeSet::new();