From 740ef47d49e02ae2f2184f4c347d8eba8aee38fd Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 15 Oct 2022 18:40:20 +0200 Subject: refactor: improve internals of macros & add unit tests --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index 2cc3cc4..a3da74a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,5 @@ #![cfg_attr(feature = "factory", feature(unboxed_closures, fn_traits))] #![cfg_attr(doc_cfg, feature(doc_cfg))] -#![cfg_attr(test, feature(register_tool))] -#![cfg_attr(test, register_tool(tarpaulin))] #![deny(clippy::all)] #![deny(clippy::pedantic)] #![allow(clippy::module_name_repetitions)] @@ -43,7 +41,7 @@ pub mod libs; mod provider; #[cfg(test)] -#[tarpaulin::skip] +#[cfg(not(tarpaulin_include))] mod test_utils; /// Shortcut for creating a DI container binding for a injectable without a declared @@ -79,6 +77,7 @@ mod test_utils; /// /// di_container_bind!(INinja => Ninja, di_container); /// ``` +#[cfg(not(tarpaulin_include))] #[macro_export] macro_rules! di_container_bind { ($interface: path => $implementation: ty, $di_container: ident) => { @@ -126,6 +125,7 @@ macro_rules! di_container_bind { /// ``` #[cfg(feature = "async")] #[cfg_attr(doc_cfg, doc(cfg(feature = "async")))] +#[cfg(not(tarpaulin_include))] #[macro_export] macro_rules! async_closure { (|$($args: ident),*| { $($inner: stmt);* }) => { -- cgit v1.2.3-18-g5258