From d69a7f9405444e86475f615f91ba6c924a293096 Mon Sep 17 00:00:00 2001 From: Max Audron Date: Tue, 7 Sep 2021 12:53:01 +0200 Subject: put benchmark behind feature flag we can compile using stable rust --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index ca2451f..220c3af 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,5 @@ -#![feature(test)] +#![cfg_attr(all(test, feature = "bench"), feature(test))] +#[cfg(all(test, feature = "bench"))] extern crate test; use anyhow::Result; @@ -19,7 +20,6 @@ macro_rules! reply { }; } - pub struct Bot { pub config: config::Config, pub irc_client: irc::client::Client, @@ -37,7 +37,7 @@ impl Bot { info!("using password from env var"); config.user.password = var } - Err(_) => () + Err(_) => (), } let irc_client = Client::from_config(config.clone().into()).await?; -- cgit v1.2.3