Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mzabaluev committed Mar 4, 2024
1 parent 247ee8b commit 6c9a624
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion crates/chain-registry/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use cometbft_rpc;
use flex_error::{define_error, TraceError};
use http;
use itertools::Itertools;
use reqwest;
use serde_json;
use std::path::PathBuf;
use cometbft_rpc;
use tokio::task::JoinError;
use tokio::time::error::Elapsed;

Expand Down
2 changes: 1 addition & 1 deletion crates/chain-registry/src/querier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ use tokio::time::timeout;
use tokio::time::Duration;
use tracing::{debug, info};

use ibc_proto::cosmos::bank::v1beta1::query_client::QueryClient;
use cometbft_rpc::{Client, SubscriptionClient, Url, WebSocketClient};
use ibc_proto::cosmos::bank::v1beta1::query_client::QueryClient;

use crate::error::RegistryError;
use crate::formatter::{SimpleWebSocketFormatter, UriFormatter};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use core::fmt;

use cometbft::evidence::DuplicateVoteEvidence;
use ibc_proto::interchain_security::ccv::provider::v1::MsgSubmitConsumerDoubleVoting as RawIcsDoubleVoting;
use ibc_proto::Protobuf;
use cometbft::evidence::DuplicateVoteEvidence;

use crate::clients::ics07_tendermint::header::Header;
use crate::signer::Signer;
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer-types/src/applications/ics29_fee/events.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use cometbft::abci;
use itertools::Itertools;
use serde_derive::{Deserialize, Serialize};
use std::fmt::Display;
use std::str::FromStr;
use cometbft::abci;

use super::error::Error;
use crate::applications::transfer::coin::RawCoin;
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer-types/src/applications/ics31_icq/events.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::collections::BTreeMap;
use std::str::FromStr;

use serde::{Deserialize, Serialize};
use cometbft::{abci, block::Height};
use serde::{Deserialize, Serialize};

use crate::core::ics24_host::identifier::{ChainId, ConnectionId};
use crate::events::IbcEvent;
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer-types/src/applications/transfer/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ use std::convert::Infallible;
use std::str::Utf8Error;
use std::string::FromUtf8Error;

use cometbft_proto::Error as CometbftProtoError;
use flex_error::{define_error, DisplayOnly, TraceError};
use subtle_encoding::Error as EncodingError;
use cometbft_proto::Error as CometbftProtoError;
use uint::FromDecStrErr;

use crate::core::ics04_channel::channel::Ordering;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ mod tests {
use core::time::Duration;
use test_log::test;

use ibc_proto::ics23::ProofSpec as Ics23ProofSpec;
use cometbft_rpc::endpoint::abci_query::AbciQuery;
use ibc_proto::ics23::ProofSpec as Ics23ProofSpec;

use crate::clients::ics07_tendermint::client_state::{AllowUpdate, ClientState};
use crate::core::ics02_client::trust_threshold::TrustThreshold;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use cometbft::{hash::Algorithm, time::Time, Hash};
use cometbft_proto::google::protobuf as tpb;
use ibc_proto::google::protobuf::Any;
use ibc_proto::ibc::lightclients::tendermint::v1::ConsensusState as RawConsensusState;
use ibc_proto::Protobuf;
use serde::{Deserialize, Serialize};
use cometbft::{hash::Algorithm, time::Time, Hash};
use cometbft_proto::google::protobuf as tpb;

use crate::clients::ics07_tendermint::error::Error;
use crate::clients::ics07_tendermint::header::Header;
Expand Down
6 changes: 3 additions & 3 deletions crates/relayer-types/src/clients/ics07_tendermint/header.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
use std::fmt::{Display, Error as FmtError, Formatter};

use bytes::Buf;
use cometbft::block::signed_header::SignedHeader;
use cometbft::validator::Set as ValidatorSet;
use ibc_proto::google::protobuf::Any;
use ibc_proto::ibc::lightclients::tendermint::v1::Header as RawHeader;
use ibc_proto::Protobuf;
use prost::Message;
use serde_derive::{Deserialize, Serialize};
use cometbft::block::signed_header::SignedHeader;
use cometbft::validator::Set as ValidatorSet;

use crate::clients::ics07_tendermint::error::Error;
use crate::core::ics02_client::client_type::ClientType;
Expand Down Expand Up @@ -150,11 +150,11 @@ impl From<Header> for RawHeader {
#[cfg(any(test, feature = "mocks"))]
pub mod test_util {

use subtle_encoding::hex;
use cometbft::block::signed_header::SignedHeader;
use cometbft::validator::Info as ValidatorInfo;
use cometbft::validator::Set as ValidatorSet;
use cometbft::PublicKey;
use subtle_encoding::hex;

use crate::clients::ics07_tendermint::header::Header;
use crate::Height;
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer-types/src/core/ics02_client/error.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use flex_error::{define_error, TraceError};
use cometbft_proto::Error as CometBFTProtoError;
use flex_error::{define_error, TraceError};

use crate::core::ics02_client::client_type::ClientType;
use crate::core::ics02_client::height::HeightError;
Expand Down
4 changes: 2 additions & 2 deletions crates/relayer-types/src/core/ics02_client/events.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! Types for the IBC events emitted from CometBFT Websocket by the client module.
use serde_derive::{Deserialize, Serialize};
use std::fmt::{Display, Error as FmtError, Formatter};
use cometbft::abci;
use cometbft_proto::Protobuf;

Check warning on line 4 in crates/relayer-types/src/core/ics02_client/events.rs

View workflow job for this annotation

GitHub Actions / template-checker

unused import: `cometbft_proto::Protobuf`
use serde_derive::{Deserialize, Serialize};
use std::fmt::{Display, Error as FmtError, Formatter};

use super::header::AnyHeader;
use crate::core::ics02_client::client_type::ClientType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use ibc_proto::Protobuf;
use num_rational::Ratio;
use serde::{Deserialize, Serialize};

use ibc_proto::ibc::lightclients::tendermint::v1::Fraction;
use cometbft::trust_threshold::TrustThresholdFraction;
use ibc_proto::ibc::lightclients::tendermint::v1::Fraction;

use crate::core::ics02_client::error::Error;

Expand Down
2 changes: 1 addition & 1 deletion crates/relayer-types/src/core/ics03_connection/events.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! Types for the IBC events emitted from CometBFT Websocket by the connection module.
use cometbft::abci;
use serde_derive::{Deserialize, Serialize};
use std::fmt::{Display, Error as FmtError, Formatter};
use cometbft::abci;

use crate::core::ics24_host::identifier::{ClientId, ConnectionId};
use crate::events::{IbcEvent, IbcEventType};
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer-types/src/core/ics04_channel/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use crate::signer::SignerError;
use crate::timestamp::Timestamp;
use crate::Height;

use flex_error::{define_error, TraceError};
use cometbft_proto::Error as CometbftError;
use flex_error::{define_error, TraceError};

define_error! {
#[derive(Debug, PartialEq, Eq)]
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer-types/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use std::convert::TryFrom;
use std::fmt::{Display, Error as FmtError, Formatter};
use std::str::FromStr;

use cometbft::abci;
use flex_error::{define_error, TraceError};
use serde_derive::{Deserialize, Serialize};
use cometbft::abci;

use crate::applications::ics29_fee::error::Error as FeeError;
use crate::applications::ics29_fee::events::{DistributeFeePacket, IncentivizedPacket};
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer-types/src/timestamp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use std::ops::{Add, Sub};
use std::str::FromStr;
use std::time::Duration;

use cometbft::Time;
use flex_error::{define_error, TraceError};
use serde_derive::{Deserialize, Serialize};
use cometbft::Time;
use time::OffsetDateTime;

pub const ZERO_DURATION: Duration = Duration::from_secs(0);
Expand Down
4 changes: 2 additions & 2 deletions crates/relayer-types/src/utils/pretty.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::fmt::{Debug, Display, Error as FmtError, Formatter};
use std::time::Duration;
use cometbft::block::signed_header::SignedHeader;
use cometbft::validator::Set as ValidatorSet;
use std::fmt::{Debug, Display, Error as FmtError, Formatter};
use std::time::Duration;

pub struct PrettyDuration<'a>(pub &'a Duration);

Expand Down

0 comments on commit 6c9a624

Please sign in to comment.