Skip to content

Commit

Permalink
explicit relative or global path for pub use
Browse files Browse the repository at this point in the history
  • Loading branch information
rnbguy committed Mar 19, 2024
1 parent 656b4b2 commit d66f9b5
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 26 deletions.
23 changes: 12 additions & 11 deletions ibc-testkit/src/fixtures/core/channel/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,23 @@ mod recv_packet;
mod timeout;
mod timeout_on_close;

pub use acknowledgement::*;
pub use chan_close_confirm::*;
pub use chan_close_init::*;
pub use chan_open_ack::*;
pub use chan_open_confirm::*;
pub use chan_open_init::*;
pub use chan_open_try::*;
use ibc::core::channel::types::proto::v1::{
Channel as RawChannel, Counterparty as RawCounterparty,
};
use ibc::core::host::types::identifiers::{ChannelId, ConnectionId, PortId};
use ibc::primitives::prelude::*;
pub use packet::*;
pub use recv_packet::*;
pub use timeout::*;
pub use timeout_on_close::*;

pub use self::acknowledgement::*;
pub use self::chan_close_confirm::*;
pub use self::chan_close_init::*;
pub use self::chan_open_ack::*;
pub use self::chan_open_confirm::*;
pub use self::chan_open_init::*;
pub use self::chan_open_try::*;
pub use self::packet::*;
pub use self::recv_packet::*;
pub use self::timeout::*;
pub use self::timeout_on_close::*;

/// Returns a dummy `RawCounterparty`, for testing purposes only!
/// Can be optionally parametrized with a specific channel identifier.
Expand Down
6 changes: 3 additions & 3 deletions ibc-testkit/src/fixtures/core/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ mod msg_update_client;
mod msg_upgrade_client;

#[cfg(feature = "serde")]
pub use msg_create_client::*;
pub use self::msg_create_client::*;
#[cfg(feature = "serde")]
pub use msg_update_client::*;
pub use msg_upgrade_client::*;
pub use self::msg_update_client::*;
pub use self::msg_upgrade_client::*;

#[cfg(test)]
mod tests {
Expand Down
9 changes: 5 additions & 4 deletions ibc-testkit/src/fixtures/core/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ mod conn_open_confirm;
mod conn_open_init;
mod conn_open_try;

pub use conn_open_ack::*;
pub use conn_open_confirm::*;
pub use conn_open_init::*;
pub use conn_open_try::*;
use ibc::core::commitment_types::proto::v1::MerklePrefix;
use ibc::core::connection::types::proto::v1::Counterparty as RawCounterparty;
use ibc::core::host::types::identifiers::ConnectionId;
use ibc::core::primitives::prelude::*;
use typed_builder::TypedBuilder;

pub use self::conn_open_ack::*;
pub use self::conn_open_confirm::*;
pub use self::conn_open_init::*;
pub use self::conn_open_try::*;

#[derive(TypedBuilder, Debug)]
#[builder(build_method(into = RawCounterparty))]
pub struct CounterpartyConfig {
Expand Down
11 changes: 5 additions & 6 deletions ibc-testkit/src/hosts/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
pub mod mock;
pub mod tendermint;

use core::fmt::Debug;
use core::ops::Add;
use core::time::Duration;
Expand All @@ -10,16 +13,12 @@ use ibc::core::primitives::Timestamp;
use ibc::primitives::proto::Any;
use typed_builder::TypedBuilder;

pub use self::mock::MockHost;
pub use self::tendermint::TendermintHost;
use crate::testapp::ibc::clients::{AnyClientState, AnyConsensusState};
use crate::testapp::ibc::core::types::DEFAULT_BLOCK_TIME_SECS;
use crate::utils::year_2023;

pub mod mock;
pub mod tendermint;

pub use crate::hosts::mock::MockHost;
pub use crate::hosts::tendermint::TendermintHost;

#[derive(Debug, TypedBuilder)]
pub struct HostParams {
#[builder(default = ChainId::new("mockgaia-0").expect("Never fails"))]

Check warning on line 24 in ibc-testkit/src/hosts/mod.rs

View check run for this annotation

Codecov / codecov/patch

ibc-testkit/src/hosts/mod.rs#L24

Added line #L24 was not covered by tests
Expand Down
2 changes: 1 addition & 1 deletion ibc-testkit/src/testapp/ibc/clients/mock/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ pub mod misbehaviour;

/// Re-exports mock proto types from the `ibc-proto` crate
pub mod proto {
pub use ibc_proto::ibc::mock::*;
pub use ::ibc_proto::ibc::mock::*;
}
2 changes: 1 addition & 1 deletion ibc-testkit/src/testapp/ibc/core/router/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mod context;
mod types;

pub use types::*;
pub use self::types::*;

0 comments on commit d66f9b5

Please sign in to comment.