From d7bc06d2dc58a2c59d8f2cfbee2ab23b8188700d Mon Sep 17 00:00:00 2001 From: Russell Cousineau Date: Fri, 2 Aug 2019 07:22:27 -0700 Subject: [PATCH] fix nightly build --- src/lib.rs | 1 + src/nfa.rs | 3 +++ 2 files changed, 4 insertions(+) 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();