From 4b2a6d2207f16d5b7cfa9049c713e210d2dca28d Mon Sep 17 00:00:00 2001 From: John Gallagher Date: Wed, 5 Apr 2017 12:46:58 -0400 Subject: [PATCH] Fix unused macro warning when compiling tests without `trace` feature. --- src/lib.rs | 2 +- tests/config_log.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index a25777a..251bdc1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -56,7 +56,7 @@ extern crate libsqlite3_sys as ffi; extern crate lru_cache; #[macro_use] extern crate bitflags; -#[cfg(test)] +#[cfg(all(test, feature = "trace"))] #[macro_use] extern crate lazy_static; diff --git a/tests/config_log.rs b/tests/config_log.rs index f945210..6ae83d1 100644 --- a/tests/config_log.rs +++ b/tests/config_log.rs @@ -1,6 +1,7 @@ //! This file contains unit tests for rusqlite::trace::config_log. This function affects //! SQLite process-wide and so is not safe to run as a normal #[test] in the library. +#[cfg(feature = "trace")] #[macro_use] extern crate lazy_static; extern crate rusqlite;