Skip to content

Commit

Permalink
chore: Refactoring: remove code coverage exclusions
Browse files Browse the repository at this point in the history
  • Loading branch information
kulikthebird committed Feb 27, 2024
1 parent 53d4af7 commit d7042f6
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 19 deletions.
2 changes: 0 additions & 2 deletions sylvia-derive/src/parser/attributes/custom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ impl Custom {
}
}

#[cfg(not(tarpaulin_include))]
// False negative. It is being called in closure
impl Parse for Custom {
fn parse(input: ParseStream) -> Result<Self> {
let mut custom = Self::default();
Expand Down
2 changes: 0 additions & 2 deletions sylvia-derive/src/parser/attributes/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ impl ContractErrorAttr {
}
}

#[cfg(not(tarpaulin_include))]
// False negative. It is being called in closure
impl Parse for ContractErrorAttr {
fn parse(input: ParseStream) -> Result<Self> {
input.parse().map(|error| Self { error })
Expand Down
2 changes: 0 additions & 2 deletions sylvia-derive/src/parser/attributes/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ fn interface_has_custom(content: ParseStream) -> Result<Customs> {
Ok(customs)
}

#[cfg(not(tarpaulin_include))]
// False negative. It is being called in closure
impl Parse for ContractMessageAttr {
fn parse(input: ParseStream) -> Result<Self> {
let module = input.parse()?;
Expand Down
1 change: 0 additions & 1 deletion sylvia/src/into_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ pub trait IntoMsg<C> {
/// `SubMsg<Empty>` can be made into any `SubMsg<C>`
impl<C> IntoMsg<C> for SubMsg<Empty> {
fn into_msg(self) -> StdResult<SubMsg<C>> {
#[cfg(not(tarpaulin_include))]
let msg = match self.msg {
CosmosMsg::Wasm(wasm) => CosmosMsg::Wasm(wasm),
CosmosMsg::Bank(bank) => CosmosMsg::Bank(bank),
Expand Down
9 changes: 0 additions & 9 deletions sylvia/tests/custom_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ mod interface {
type Error: From<StdError>;
type QueryC: CustomQuery;

#[cfg(not(tarpaulin_include))]
#[sv::msg(query)]
fn interface_query(&self, ctx: QueryCtx<MyQuery>) -> StdResult<SomeResponse>;

#[cfg(not(tarpaulin_include))]
#[sv::msg(exec)]
fn interface_exec(&self, ctx: ExecCtx<MyQuery>) -> StdResult<Response>;
}
Expand Down Expand Up @@ -79,11 +77,9 @@ mod some_interface {
pub trait SomeInterface {
type Error: From<StdError>;

#[cfg(not(tarpaulin_include))]
#[sv::msg(query)]
fn some_interface_query(&self, ctx: QueryCtx<MyQuery>) -> StdResult<SomeResponse>;

#[cfg(not(tarpaulin_include))]
#[sv::msg(exec)]
fn some_interface_exec(&self, ctx: ExecCtx<MyQuery>) -> StdResult<Response>;
}
Expand Down Expand Up @@ -126,11 +122,9 @@ mod associated_type_interface {
type Error: From<StdError>;
type QueryC: CustomQuery;

#[cfg(not(tarpaulin_include))]
#[sv::msg(query)]
fn associated_query(&self, ctx: QueryCtx<Self::QueryC>) -> StdResult<SomeResponse>;

#[cfg(not(tarpaulin_include))]
#[sv::msg(exec)]
fn associated_exec(&self, ctx: ExecCtx<Self::QueryC>) -> StdResult<Response>;
}
Expand Down Expand Up @@ -171,11 +165,9 @@ mod default_query_interface {
pub trait DefaultQueryInterface {
type Error: From<StdError>;

#[cfg(not(tarpaulin_include))]
#[sv::msg(query)]
fn default_query(&self, ctx: QueryCtx) -> StdResult<SomeResponse>;

#[cfg(not(tarpaulin_include))]
#[sv::msg(exec)]
fn default_exec(&self, ctx: ExecCtx) -> StdResult<Response>;
}
Expand Down Expand Up @@ -232,7 +224,6 @@ impl MyContract {
Ok(SomeResponse)
}

#[cfg(not(tarpaulin_include))]
#[sv::msg(migrate)]
pub fn some_migrate(&self, _ctx: MigrateCtx<MyQuery>) -> StdResult<Response> {
Ok(Response::default())
Expand Down
1 change: 0 additions & 1 deletion sylvia/tests/dispatching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ mod contract {
}

#[allow(dead_code)]
#[cfg(not(tarpaulin_include))]
#[contract]
#[sv::messages(crate::interface)]
impl Contract {
Expand Down
1 change: 0 additions & 1 deletion sylvia/tests/entry_points.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ mod contract {

pub struct Contract {}

#[cfg(not(tarpaulin_include))]
#[contract]
#[sv::override_entry_point(sudo=crate::entry_points::sudo(crate::SudoMsg))]
#[sv::override_entry_point(migrate=crate::entry_points::migrate(crate::migrate::MigrateMsg))]
Expand Down
1 change: 0 additions & 1 deletion sylvia/tests/messages_generation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ mod contract {

pub struct Contract {}

#[cfg(not(tarpaulin_include))]
#[entry_points]
#[contract]
#[allow(dead_code)]
Expand Down

0 comments on commit d7042f6

Please sign in to comment.