Skip to content

Commit

Permalink
cargo fmt and clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
rnbguy committed Aug 28, 2023
1 parent e86e5d8 commit 6a1a3b1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/app/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub async fn default_app_runner(server_cfg: ServerConfig) {
// instantiate gRPC services for each module
let auth_service = auth.service();
let bank_service = bank.service();
let ibc_client_service = ibc.client_service();
let ibc_client_service = ibc.client_service(&upgrade);
let ibc_conn_service = ibc.connection_service();
let ibc_channel_service = ibc.channel_service();
let governance_service = governance.service();
Expand Down
29 changes: 21 additions & 8 deletions src/modules/ibc/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,13 @@ use super::router::IbcRouter;
use crate::{
error::Error as AppError,
helper::{Height, Path, QueryResult},
modules::{bank::impls::BankBalanceKeeper, IbcTransferModule, Identifiable, Module},
modules::{bank::impls::BankBalanceKeeper, IbcTransferModule, Identifiable, Module, Upgrade},
store::{
SharedStore, {BinStore, JsonStore, ProtobufStore, TypedSet, TypedStore},
{ProvableStore, Store},
},
};
use cosmrs::AccountId;
use ibc::services::{
channel::ChannelQueryServer as ChannelQueryService,
client::ClientQueryServer as ClientQueryService,
connection::ConnectionQueryServer as ConnectionQueryService,
};
use ibc::{
applications::transfer::msgs::transfer::MsgTransfer,
clients::ics07_tendermint::{
Expand Down Expand Up @@ -55,6 +50,14 @@ use ibc::{
core::{events::IbcEvent, timestamp::Timestamp},
Signer,
};
use ibc::{
core::ics02_client::client_type::ClientType,
services::{
channel::ChannelQueryServer as ChannelQueryService,
client::ClientQueryServer as ClientQueryService,
connection::ConnectionQueryServer as ConnectionQueryService,
},
};
use ibc_proto::{
google::protobuf::Any,
ibc::core::{
Expand Down Expand Up @@ -124,8 +127,14 @@ where
}
}

pub fn client_service(&self) -> ClientQueryServer<ClientQueryService<IbcContext<S>>> {
ClientQueryServer::new(ClientQueryService::new(self.ctx.clone()))
pub fn client_service(
&self,
update_context: &Upgrade<S>,
) -> ClientQueryServer<ClientQueryService<IbcContext<S>, Upgrade<S>>> {

Check failure on line 133 in src/modules/ibc/impls.rs

View workflow job for this annotation

GitHub Actions / cargo-doc

struct takes 1 generic argument but 2 generic arguments were supplied

Check failure on line 133 in src/modules/ibc/impls.rs

View workflow job for this annotation

GitHub Actions / test

struct takes 1 generic argument but 2 generic arguments were supplied

Check failure on line 133 in src/modules/ibc/impls.rs

View workflow job for this annotation

GitHub Actions / clippy

struct takes 1 generic argument but 2 generic arguments were supplied

error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied --> src/modules/ibc/impls.rs:133:28 | 133 | ) -> ClientQueryServer<ClientQueryService<IbcContext<S>, Upgrade<S>>> { | ^^^^^^^^^^^^^^^^^^ ---------- help: remove this generic argument | | | expected 1 generic argument | note: struct defined here, with 1 generic parameter: `T` --> /home/runner/.cargo/git/checkouts/ibc-rs-54b257bb4e0c6ae7/6eb22d3/crates/ibc/src/services/client.rs:28:12 | 28 | pub struct ClientQueryServer<T> { | ^^^^^^^^^^^^^^^^^ -
ClientQueryServer::new(ClientQueryService::new(
self.ctx.clone(),
update_context.clone(),
))
}

pub fn connection_service(
Expand Down Expand Up @@ -712,6 +721,10 @@ where
Ok(client_state.status(self, client_id)?)
}

fn allowed_clients(&self) -> Vec<ClientType> {

Check failure on line 724 in src/modules/ibc/impls.rs

View workflow job for this annotation

GitHub Actions / cargo-doc

method `allowed_clients` is not a member of trait `QueryContext`

Check failure on line 724 in src/modules/ibc/impls.rs

View workflow job for this annotation

GitHub Actions / test

method `allowed_clients` is not a member of trait `QueryContext`
vec![ClientType::new("07-tendermint").expect("no error")]
}

Check failure on line 726 in src/modules/ibc/impls.rs

View workflow job for this annotation

GitHub Actions / clippy

method `allowed_clients` is not a member of trait `QueryContext`

error[E0407]: method `allowed_clients` is not a member of trait `QueryContext` --> src/modules/ibc/impls.rs:724:5 | 724 | / fn allowed_clients(&self) -> Vec<ClientType> { 725 | | vec![ClientType::new("07-tendermint").expect("no error")] 726 | | } | |_____^ not a member of trait `QueryContext`

fn connection_ends(
&self,
) -> Result<Vec<ibc::core::ics03_connection::connection::IdentifiedConnectionEnd>, ContextError>
Expand Down

0 comments on commit 6a1a3b1

Please sign in to comment.