]> git.lizzy.rs Git - rust.git/commitdiff
Add public re-exports for benches
authorIgor Aleksanov <popzxc@yandex.ru>
Fri, 18 Oct 2019 05:32:44 +0000 (08:32 +0300)
committerIgor Aleksanov <popzxc@yandex.ru>
Fri, 18 Oct 2019 05:32:44 +0000 (08:32 +0300)
src/libtest/bench.rs
src/libtest/lib.rs

index bb5b0d1da533772299e42d04ddf1edd2017770f6..c142c5213d2e0c579a2645753baf497a56c26152 100644 (file)
@@ -1,4 +1,6 @@
 //! Benchmarking module.
+pub use std::hint::black_box;
+
 use super::{
     event::CompletedTest,
     helpers::sink::Sink,
@@ -14,7 +16,6 @@
 use std::io;
 use std::panic::{catch_unwind, AssertUnwindSafe};
 use std::sync::{Arc, Mutex};
-use std::hint::black_box;
 
 /// Manager of the benchmarking runs.
 ///
index 89f527b6bd763f2c099ddfb6f054fb7ff833611a..179558e8f9a184efcbe9af4ce88cdd86b336700a 100644 (file)
@@ -35,6 +35,7 @@
 pub use self::types::*;
 pub use self::types::TestName::*;
 pub use self::options::{Options, ShouldPanic};
+pub use self::bench::{Bencher, black_box};
 
 // Module to be used by rustc to compile tests in libtest
 pub mod test {
@@ -67,6 +68,7 @@ pub mod test {
 };
 
 pub mod stats;
+pub mod bench;
 mod formatters;
 mod cli;
 mod console;
@@ -75,7 +77,6 @@ pub mod test {
 mod time;
 mod types;
 mod options;
-mod bench;
 mod test_result;
 
 #[cfg(test)]