From d88062dc6d6eeab002c2319b2d5b727842e18825 Mon Sep 17 00:00:00 2001 From: Trivernis Date: Fri, 3 Apr 2020 10:07:39 +0200 Subject: [PATCH] Remove nightly features --- src/main.rs | 44 -------------------------------------------- 1 file changed, 44 deletions(-) diff --git a/src/main.rs b/src/main.rs index 81a1b60..93ad6d4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,5 @@ -#![feature(test)] #![allow(dead_code)] -extern crate test; - use rayon::prelude::*; use std::fmt::{self, Display}; use std::time::{Duration, Instant}; @@ -241,44 +238,3 @@ mod to_test { handle.join().unwrap(); } } - -#[cfg(test)] -mod tests { - use super::to_test::*; - use test::Bencher; - - #[bench] - fn bench_start_thread(b: &mut Bencher) { - b.iter(|| start_stop_thread()); - } - - #[bench] - fn bench_mpsc_channel(b: &mut Bencher) { - b.iter(|| send_mpsc_channel()) - } - - #[bench] - fn bench_mpmc_channel(b: &mut Bencher) { - b.iter(|| send_mpmc_channel()) - } - - #[bench] - fn bench_multiply_to_100(b: &mut Bencher) { - b.iter(|| multiply_to(100)); - } - - #[test] - fn test_largest_prime_functions() { - assert_eq!(largest_prime_par(1000), largest_prime(1000)) - } - - #[bench] - fn bench_largest_prime_1000000(b: &mut Bencher) { - b.iter(|| largest_prime(1000000)); - } - - #[bench] - fn bench_largest_prime_1000000_par(b: &mut Bencher) { - b.iter(|| largest_prime_par(1000000)); - } -}