Skip to content

Commit

Permalink
remove duplicate macro
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberHoward committed Jul 23, 2024
1 parent 1c06b2e commit e851876
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 44 deletions.
22 changes: 0 additions & 22 deletions cw-orch-daemon/src/queriers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,6 @@ pub trait DaemonQuerier {
fn new(channel: tonic::transport::Channel) -> Self;

Check failure on line 43 in cw-orch-daemon/src/queriers.rs

View workflow job for this annotation

GitHub Actions / clippy

the name `new` is defined multiple times

error[E0428]: the name `new` is defined multiple times --> cw-orch-daemon/src/queriers.rs:43:5 | 41 | fn new(client: cosmrs::rpc::HttpClient) -> Self; | ------------------------------------------------ previous definition of the value `new` here 42 | #[cfg(feature = "grpc")] 43 | fn new(channel: tonic::transport::Channel) -> Self; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `new` redefined here | = note: `new` must be defined only once in the value namespace of this trait
}

/// macro for constructing and performing a query on a CosmosSDK module.
#[macro_export]
macro_rules! cosmos_query {
($self:ident, $module:ident, $func_name:ident, $request_type:ident { $($field:ident : $value:expr),* $(,)? }) => {
{
use $crate::cosmos_modules::$module::{
query_client::QueryClient, $request_type,
};
let mut client = QueryClient::new($self.channel.clone());
#[allow(clippy::redundant_field_names)]
let request = $request_type { $($field : $value),* };
let response = client.$func_name(request.clone()).await?.into_inner();
::log::trace!(
"cosmos_query: {:?} resulted in: {:?}",
request,
response
);
response
}
};
}

mod authz;
mod env;
// mod bank;
Expand Down
22 changes: 0 additions & 22 deletions cw-orch-daemon/src/queriers/clients/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,6 @@
//! # })
//! ```
/// macro for constructing and performing a query on a CosmosSDK module.
#[macro_export]
macro_rules! cosmos_query {
($self:ident, $module:ident, $func_name:ident, $request_type:ident { $($field:ident : $value:expr),* $(,)? }) => {
{
use $crate::cosmos_modules::$module::{
query_client::QueryClient, $request_type,
};
let mut client = QueryClient::new($self.channel.clone());
#[allow(clippy::redundant_field_names)]
let request = $request_type { $($field : $value),* };
let response = client.$func_name(request.clone()).await?.into_inner();
::log::trace!(
"cosmos_query: {:?} resulted in: {:?}",
request,
response
);
response
}
};
}

mod auth;
mod bank;
mod cosmwasm;
Expand Down

0 comments on commit e851876

Please sign in to comment.