From 1f2000e8e1e3166fc3525572ab2d236410df9b95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wo=C5=BAniak?= Date: Tue, 1 Aug 2023 10:27:54 +0200 Subject: [PATCH] chore: supress incorrect tarpaulin checks --- sylvia-derive/src/lib.rs | 1 + sylvia-derive/src/parser.rs | 4 +++- sylvia-derive/src/utils.rs | 1 + sylvia/src/types.rs | 3 +++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sylvia-derive/src/lib.rs b/sylvia-derive/src/lib.rs index da68984e..a002c044 100644 --- a/sylvia-derive/src/lib.rs +++ b/sylvia-derive/src/lib.rs @@ -256,6 +256,7 @@ pub fn entry_points(attr: TokenStream, item: TokenStream) -> TokenStream { entry_points_impl(attr.into(), item.into()).into() } +#[cfg(not(tarpaulin_include))] fn entry_points_impl(attr: TokenStream2, item: TokenStream2) -> TokenStream2 { fn inner(_attr: TokenStream2, item: TokenStream2) -> syn::Result { let input: ItemImpl = parse2(item)?; diff --git a/sylvia-derive/src/parser.rs b/sylvia-derive/src/parser.rs index c64b96b3..205eadde 100644 --- a/sylvia-derive/src/parser.rs +++ b/sylvia-derive/src/parser.rs @@ -82,6 +82,7 @@ impl MsgType { } } + #[cfg(not(tarpaulin_include))] pub fn emit_ctx_params(self) -> TokenStream { use MsgType::*; @@ -100,6 +101,7 @@ impl MsgType { } } + #[cfg(not(tarpaulin_include))] pub fn emit_ep_name(self) -> TokenStream { use MsgType::*; @@ -489,6 +491,7 @@ impl OverrideEntryPoint { } } + #[cfg(not(tarpaulin_include))] pub fn emit_default_entry_point( custom_msg: &Type, name: &Type, @@ -497,7 +500,6 @@ impl OverrideEntryPoint { ) -> TokenStream { let sylvia = crate_module(); - #[cfg(not(tarpaulin_include))] let resp_type = match msg_type { MsgType::Query => quote! { #sylvia ::cw_std::Binary }, _ => quote! { #sylvia ::cw_std::Response < #custom_msg > }, diff --git a/sylvia-derive/src/utils.rs b/sylvia-derive/src/utils.rs index e1f6c8f4..108e6db4 100644 --- a/sylvia-derive/src/utils.rs +++ b/sylvia-derive/src/utils.rs @@ -9,6 +9,7 @@ use syn::{ use crate::check_generics::CheckGenerics; use crate::message::MsgField; +#[cfg(not(tarpaulin_include))] pub fn filter_wheres<'a>( clause: &'a Option, generics: &[&GenericParam], diff --git a/sylvia/src/types.rs b/sylvia/src/types.rs index 133fd8c1..725d57d3 100644 --- a/sylvia/src/types.rs +++ b/sylvia/src/types.rs @@ -32,6 +32,7 @@ pub struct SudoCtx<'a, C: CustomQuery = Empty> { pub env: Env, } +#[cfg(not(tarpaulin_include))] impl ExecCtx<'_, C> { pub fn branch(&'_ mut self) -> ExecCtx<'_, C> { ExecCtx { @@ -42,6 +43,7 @@ impl ExecCtx<'_, C> { } } +#[cfg(not(tarpaulin_include))] impl InstantiateCtx<'_, C> { pub fn branch(&'_ mut self) -> InstantiateCtx<'_, C> { InstantiateCtx { @@ -52,6 +54,7 @@ impl InstantiateCtx<'_, C> { } } +#[cfg(not(tarpaulin_include))] impl SudoCtx<'_, C> { pub fn branch(&'_ mut self) -> SudoCtx<'_, C> { SudoCtx {