From 78288b829b1f7b36adbbe02befbd698e73048f00 Mon Sep 17 00:00:00 2001 From: Davirain Date: Wed, 31 May 2023 21:12:09 +0800 Subject: [PATCH 1/5] remove prelude, and alloc, core import --- Cargo.lock | 125 ++++++++++++++++++ crates/chain-registry/Cargo.toml | 2 +- crates/relayer-cli/Cargo.toml | 2 +- .../relayer-cli/src/commands/config/auto.rs | 2 +- crates/relayer-cli/src/lib.rs | 2 +- crates/relayer-types/Cargo.toml | 14 +- .../src/applications/ics29_fee/error.rs | 1 - .../src/applications/ics29_fee/events.rs | 6 +- .../applications/ics29_fee/msgs/pay_packet.rs | 2 +- .../ics29_fee/msgs/pay_packet_async.rs | 2 +- .../ics29_fee/msgs/register_payee.rs | 2 +- .../src/applications/ics29_fee/packet_fee.rs | 4 +- .../src/applications/ics31_icq/error.rs | 1 - .../src/applications/ics31_icq/events.rs | 5 +- .../src/applications/ics31_icq/response.rs | 4 - .../applications/transfer/acknowledgement.rs | 4 +- .../src/applications/transfer/amount.rs | 7 +- .../src/applications/transfer/coin.rs | 5 +- .../src/applications/transfer/denom.rs | 5 +- .../src/applications/transfer/error.rs | 7 +- .../src/applications/transfer/events.rs | 2 +- .../applications/transfer/msgs/transfer.rs | 2 - .../src/applications/transfer/packet.rs | 6 +- .../clients/ics07_tendermint/client_state.rs | 8 +- .../ics07_tendermint/consensus_state.rs | 2 - .../src/clients/ics07_tendermint/error.rs | 2 - .../src/clients/ics07_tendermint/header.rs | 4 +- .../clients/ics07_tendermint/misbehaviour.rs | 2 - .../src/core/ics02_client/client_state.rs | 6 +- .../src/core/ics02_client/client_type.rs | 3 +- .../src/core/ics02_client/consensus_state.rs | 4 +- .../src/core/ics02_client/error.rs | 2 - .../src/core/ics02_client/events.rs | 3 +- .../src/core/ics02_client/header.rs | 2 - .../src/core/ics02_client/height.rs | 7 +- .../src/core/ics02_client/misbehaviour.rs | 1 - .../core/ics02_client/msgs/create_client.rs | 2 - .../core/ics02_client/msgs/misbehaviour.rs | 2 - .../core/ics02_client/msgs/update_client.rs | 2 - .../core/ics02_client/msgs/upgrade_client.rs | 4 +- .../src/core/ics02_client/trust_threshold.rs | 4 +- .../src/core/ics03_connection/connection.rs | 8 +- .../src/core/ics03_connection/events.rs | 3 +- .../src/core/ics03_connection/msgs.rs | 3 +- .../ics03_connection/msgs/conn_open_ack.rs | 5 +- .../msgs/conn_open_confirm.rs | 5 +- .../ics03_connection/msgs/conn_open_init.rs | 7 +- .../ics03_connection/msgs/conn_open_try.rs | 7 +- .../src/core/ics03_connection/version.rs | 4 +- .../src/core/ics04_channel/channel.rs | 8 +- .../src/core/ics04_channel/commitment.rs | 2 - .../src/core/ics04_channel/error.rs | 2 +- .../src/core/ics04_channel/events.rs | 6 +- .../ics04_channel/msgs/acknowledgement.rs | 3 - .../ics04_channel/msgs/chan_close_confirm.rs | 5 +- .../ics04_channel/msgs/chan_close_init.rs | 5 +- .../core/ics04_channel/msgs/chan_open_ack.rs | 6 +- .../ics04_channel/msgs/chan_open_confirm.rs | 6 +- .../core/ics04_channel/msgs/chan_open_init.rs | 5 +- .../core/ics04_channel/msgs/chan_open_try.rs | 5 +- .../core/ics04_channel/msgs/recv_packet.rs | 3 - .../src/core/ics04_channel/msgs/timeout.rs | 3 - .../ics04_channel/msgs/timeout_on_close.rs | 4 +- .../src/core/ics04_channel/packet.rs | 7 +- .../src/core/ics04_channel/packet_id.rs | 4 +- .../src/core/ics04_channel/timeout.rs | 3 +- .../src/core/ics04_channel/version.rs | 7 +- .../src/core/ics23_commitment/commitment.rs | 5 +- .../src/core/ics23_commitment/merkle.rs | 1 - .../src/core/ics23_commitment/specs.rs | 2 - .../src/core/ics24_host/error.rs | 2 - .../src/core/ics24_host/identifier.rs | 1 - .../relayer-types/src/core/ics24_host/path.rs | 2 - .../src/core/ics24_host/validate.rs | 2 - .../src/core/ics26_routing/error.rs | 1 - .../src/core/ics26_routing/msgs.rs | 2 - crates/relayer-types/src/dynamic_typing.rs | 2 +- crates/relayer-types/src/events.rs | 9 +- crates/relayer-types/src/handler.rs | 4 +- crates/relayer-types/src/lib.rs | 8 -- crates/relayer-types/src/mock/client_state.rs | 4 +- .../relayer-types/src/mock/consensus_state.rs | 2 - crates/relayer-types/src/mock/header.rs | 3 +- crates/relayer-types/src/mock/host.rs | 2 +- crates/relayer-types/src/mock/misbehaviour.rs | 2 - crates/relayer-types/src/prelude.rs | 15 --- .../src/relayer/ics18_relayer/context.rs | 1 - crates/relayer-types/src/serializers.rs | 2 +- crates/relayer-types/src/signer.rs | 4 +- crates/relayer-types/src/test_utils.rs | 1 - crates/relayer-types/src/timestamp.rs | 14 +- crates/relayer-types/src/tx_msg.rs | 1 - crates/relayer-types/src/utils/pretty.rs | 7 +- crates/relayer/src/link/operational_data.rs | 4 +- .../src/bin/test_setup_with_binary_channel.rs | 2 +- ...t_setup_with_fee_enabled_binary_channel.rs | 2 +- .../bin/test_setup_with_ternary_channel.rs | 2 +- 97 files changed, 244 insertions(+), 263 deletions(-) delete mode 100644 crates/relayer-types/src/prelude.rs diff --git a/Cargo.lock b/Cargo.lock index cb148701b4..7e9ad45f1a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -92,6 +92,12 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +[[package]] +name = "arrayvec" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" + [[package]] name = "async-stream" version = "0.3.5" @@ -288,6 +294,18 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + [[package]] name = "block-buffer" version = "0.9.0" @@ -321,6 +339,12 @@ version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + [[package]] name = "byte-unit" version = "4.0.19" @@ -527,6 +551,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + [[package]] name = "core-foundation" version = "0.9.3" @@ -703,8 +733,10 @@ version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ + "convert_case", "proc-macro2", "quote", + "rustc_version", "syn 1.0.109", ] @@ -969,6 +1001,9 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", "static_assertions", ] @@ -1004,6 +1039,12 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541" +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + [[package]] name = "futures" version = "0.3.28" @@ -1738,6 +1779,15 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + [[package]] name = "impl-serde" version = "0.4.0" @@ -1747,6 +1797,17 @@ dependencies = [ "serde", ] +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "indenter" version = "0.3.3" @@ -2160,6 +2221,32 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +[[package]] +name = "parity-scale-codec" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ddb756ca205bd108aee3c62c6d3c994e1df84a59b9d6d4a5ea42ee1fd5a9a28" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b26a931f824dd4eca30b3e43bb4f31cd5f0d3a403c5f5ff27106b805bfde7b" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "parking_lot" version = "0.12.1" @@ -2296,10 +2383,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" dependencies = [ "fixed-hash", + "impl-codec", "impl-serde", "uint", ] +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -2422,6 +2520,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + [[package]] name = "rand" version = "0.7.3" @@ -2654,6 +2758,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + [[package]] name = "rustc_version" version = "0.4.0" @@ -3333,6 +3443,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + [[package]] name = "tempfile" version = "3.5.0" @@ -4476,6 +4592,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + [[package]] name = "zeroize" version = "1.6.0" diff --git a/crates/chain-registry/Cargo.toml b/crates/chain-registry/Cargo.toml index ca21da402c..57da3d2f1a 100644 --- a/crates/chain-registry/Cargo.toml +++ b/crates/chain-registry/Cargo.toml @@ -13,7 +13,7 @@ description = """ [dependencies] ibc-proto = { version = "0.31.0-alpha.2" } -ibc-relayer-types = { version = "0.24.0", path = "../relayer-types", features = ["std"] } +ibc-relayer-types = { version = "0.24.0", path = "../relayer-types" } tendermint-rpc = { version = "0.32.0", features = ["http-client", "websocket-client"] } async-trait = "0.1.67" diff --git a/crates/relayer-cli/Cargo.toml b/crates/relayer-cli/Cargo.toml index 6451a0952f..b399dbf218 100644 --- a/crates/relayer-cli/Cargo.toml +++ b/crates/relayer-cli/Cargo.toml @@ -25,7 +25,7 @@ telemetry = ["ibc-relayer/telemetry", "ibc-telemetry"] rest-server = ["ibc-relayer-rest"] [dependencies] -ibc-relayer-types = { version = "0.24.0", path = "../relayer-types", features = ["std", "clock"] } +ibc-relayer-types = { version = "0.24.0", path = "../relayer-types" } ibc-relayer = { version = "0.24.0", path = "../relayer" } ibc-telemetry = { version = "0.24.0", path = "../telemetry", optional = true } ibc-relayer-rest = { version = "0.24.0", path = "../relayer-rest", optional = true } diff --git a/crates/relayer-cli/src/commands/config/auto.rs b/crates/relayer-cli/src/commands/config/auto.rs index 25aa651826..c15a967780 100644 --- a/crates/relayer-cli/src/commands/config/auto.rs +++ b/crates/relayer-cli/src/commands/config/auto.rs @@ -94,7 +94,7 @@ impl Runnable for AutoCmd { .iter_mut() .zip(names_and_keys.iter().map(|n| &n.1).cloned()); - for (mut chain_config, key_option) in configs_and_keys { + for (chain_config, key_option) in configs_and_keys { // If a key is provided, use it if let Some(key_name) = key_option { info!("{}: uses key \"{}\"", &chain_config.id, &key_name); diff --git a/crates/relayer-cli/src/lib.rs b/crates/relayer-cli/src/lib.rs index 428e79f7a9..517b2cd7f7 100644 --- a/crates/relayer-cli/src/lib.rs +++ b/crates/relayer-cli/src/lib.rs @@ -17,7 +17,7 @@ rust_2018_idioms, trivial_casts, unused_lifetimes, - unused_qualifications + // unused_qualifications )] #![allow(deprecated)] diff --git a/crates/relayer-types/Cargo.toml b/crates/relayer-types/Cargo.toml index 0311563446..1b9f5cc867 100644 --- a/crates/relayer-types/Cargo.toml +++ b/crates/relayer-types/Cargo.toml @@ -17,17 +17,14 @@ description = """ all-features = true [features] -default = ["std"] -std = ["flex-error/std", "flex-error/eyre_tracer", "ibc-proto/std", "clock"] -clock = ["tendermint/clock", "time/std"] - +clock = [] # This feature grants access to development-time mocking libraries, such as `MockContext` or `MockHeader`. # Depends on the `testgen` suite for generating Tendermint light blocks. -mocks = ["tendermint-testgen", "clock", "std"] +mocks = ["tendermint-testgen", "clock"] [dependencies] # Proto definitions for all IBC-related interfaces, e.g., connections or channels. -ibc-proto = { version = "0.31.0-alpha.2", features = ["std"] } +ibc-proto = { version = "0.31.0-alpha.2" } ics23 = { version = "0.10.1", features = ["std", "host-functions"] } time = { version = ">=0.3.0, <0.3.21" } serde_derive = { version = "1.0.104" } @@ -39,15 +36,16 @@ bytes = { version = "1.4.0" } safe-regex = { version = "0.2.5" } subtle-encoding = { version = "0.5" } flex-error = { version = "0.4.4" } -derive_more = { version = "0.99.17", default-features = false, features = ["from", "into", "display"] } +derive_more = { version = "0.99.17", features = ["from", "into", "display"] } uint = { version = "0.9" } itertools = { version = "0.10.3" } -primitive-types = { version = "0.12.1", default-features = false, features = ["serde_no_std"] } +primitive-types = { version = "0.12.1", features = ["serde_no_std"] } dyn-clone = "1.0.8" num-rational = "0.4.1" [dependencies.tendermint] version = "0.32.0" +features = ["clock"] [dependencies.tendermint-proto] version = "0.32.0" diff --git a/crates/relayer-types/src/applications/ics29_fee/error.rs b/crates/relayer-types/src/applications/ics29_fee/error.rs index 59962a2828..79ba5e1bc2 100644 --- a/crates/relayer-types/src/applications/ics29_fee/error.rs +++ b/crates/relayer-types/src/applications/ics29_fee/error.rs @@ -4,7 +4,6 @@ use prost::EncodeError; use crate::applications::transfer::error::Error as TransferError; use crate::core::ics04_channel::error::Error as ChannelError; use crate::core::ics24_host::error::ValidationError; -use crate::prelude::*; use crate::signer::SignerError; define_error! { diff --git a/crates/relayer-types/src/applications/ics29_fee/events.rs b/crates/relayer-types/src/applications/ics29_fee/events.rs index 6c7cc44edf..34ea98c8c0 100644 --- a/crates/relayer-types/src/applications/ics29_fee/events.rs +++ b/crates/relayer-types/src/applications/ics29_fee/events.rs @@ -1,7 +1,7 @@ -use core::fmt::Display; -use core::str::FromStr; use itertools::Itertools; use serde_derive::{Deserialize, Serialize}; +use std::fmt::Display; +use std::str::FromStr; use tendermint::abci; use super::error::Error; @@ -9,7 +9,7 @@ use crate::applications::transfer::coin::RawCoin; use crate::core::ics04_channel::packet::Sequence; use crate::core::ics24_host::identifier::{ChannelId, PortId}; use crate::events::IbcEventType; -use crate::prelude::*; + use crate::signer::Signer; #[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq)] diff --git a/crates/relayer-types/src/applications/ics29_fee/msgs/pay_packet.rs b/crates/relayer-types/src/applications/ics29_fee/msgs/pay_packet.rs index 6047d7d412..80e74c04a4 100644 --- a/crates/relayer-types/src/applications/ics29_fee/msgs/pay_packet.rs +++ b/crates/relayer-types/src/applications/ics29_fee/msgs/pay_packet.rs @@ -4,7 +4,7 @@ use ibc_proto::ibc::applications::fee::v1::{Fee as ProtoFee, MsgPayPacketFee}; use crate::applications::ics29_fee::error::Error; use crate::applications::transfer::coin::RawCoin; use crate::core::ics24_host::identifier::{ChannelId, PortId}; -use crate::prelude::*; + use crate::signer::Signer; use crate::tx_msg::encode_message; diff --git a/crates/relayer-types/src/applications/ics29_fee/msgs/pay_packet_async.rs b/crates/relayer-types/src/applications/ics29_fee/msgs/pay_packet_async.rs index 436060f23a..4787f74f63 100644 --- a/crates/relayer-types/src/applications/ics29_fee/msgs/pay_packet_async.rs +++ b/crates/relayer-types/src/applications/ics29_fee/msgs/pay_packet_async.rs @@ -8,7 +8,7 @@ use crate::applications::ics29_fee::error::Error; use crate::applications::transfer::coin::RawCoin; use crate::core::ics04_channel::packet::Sequence; use crate::core::ics24_host::identifier::{ChannelId, PortId}; -use crate::prelude::*; + use crate::signer::Signer; use crate::tx_msg::encode_message; diff --git a/crates/relayer-types/src/applications/ics29_fee/msgs/register_payee.rs b/crates/relayer-types/src/applications/ics29_fee/msgs/register_payee.rs index 0e362841d2..5ba8901471 100644 --- a/crates/relayer-types/src/applications/ics29_fee/msgs/register_payee.rs +++ b/crates/relayer-types/src/applications/ics29_fee/msgs/register_payee.rs @@ -3,7 +3,7 @@ use ibc_proto::ibc::applications::fee::v1::{MsgRegisterCounterpartyPayee, MsgReg use crate::applications::ics29_fee::error::Error; use crate::core::ics24_host::identifier::{ChannelId, PortId}; -use crate::prelude::*; + use crate::signer::Signer; use crate::tx_msg::encode_message; diff --git a/crates/relayer-types/src/applications/ics29_fee/packet_fee.rs b/crates/relayer-types/src/applications/ics29_fee/packet_fee.rs index 8112c550f3..366ecba740 100644 --- a/crates/relayer-types/src/applications/ics29_fee/packet_fee.rs +++ b/crates/relayer-types/src/applications/ics29_fee/packet_fee.rs @@ -1,14 +1,14 @@ -use core::str::FromStr; use ibc_proto::cosmos::base::v1beta1::Coin as ProtoCoin; use ibc_proto::ibc::applications::fee::v1::{ Fee as ProtoFee, IdentifiedPacketFees as ProtoIdentifiedPacketFees, PacketFee as ProtoPacketFee, }; +use std::str::FromStr; use super::error::Error; use crate::applications::transfer::amount::Amount; use crate::applications::transfer::coin::RawCoin; use crate::core::ics04_channel::packet_id::PacketId; -use crate::prelude::*; + use crate::signer::Signer; /// The core type that encodes the different fees that are redeemable by relayers for relaying diff --git a/crates/relayer-types/src/applications/ics31_icq/error.rs b/crates/relayer-types/src/applications/ics31_icq/error.rs index 4e9ef64ade..32251625af 100644 --- a/crates/relayer-types/src/applications/ics31_icq/error.rs +++ b/crates/relayer-types/src/applications/ics31_icq/error.rs @@ -1,7 +1,6 @@ use crate::core::ics24_host::error::ValidationError as Ics24ValidationError; use tendermint::error::Error as TendermintError; -use crate::prelude::*; use flex_error::define_error; define_error! { diff --git a/crates/relayer-types/src/applications/ics31_icq/events.rs b/crates/relayer-types/src/applications/ics31_icq/events.rs index 30532760fb..307e38f1d2 100644 --- a/crates/relayer-types/src/applications/ics31_icq/events.rs +++ b/crates/relayer-types/src/applications/ics31_icq/events.rs @@ -1,12 +1,11 @@ -use alloc::collections::BTreeMap; -use core::str::FromStr; +use std::collections::BTreeMap; +use std::str::FromStr; use serde::{Deserialize, Serialize}; use tendermint::{abci, block::Height}; use crate::core::ics24_host::identifier::{ChainId, ConnectionId}; use crate::events::IbcEvent; -use crate::prelude::*; use super::error::Error; diff --git a/crates/relayer-types/src/applications/ics31_icq/response.rs b/crates/relayer-types/src/applications/ics31_icq/response.rs index ce2ffca086..98b45acf06 100644 --- a/crates/relayer-types/src/applications/ics31_icq/response.rs +++ b/crates/relayer-types/src/applications/ics31_icq/response.rs @@ -1,7 +1,3 @@ -use alloc::string::{String, ToString}; -use alloc::vec; -use alloc::vec::Vec; - use ibc_proto::google::protobuf::Any; use ibc_proto::stride::interchainquery::v1::MsgSubmitQueryResponse; use prost::Message; diff --git a/crates/relayer-types/src/applications/transfer/acknowledgement.rs b/crates/relayer-types/src/applications/transfer/acknowledgement.rs index e7e72121a3..35251d4485 100644 --- a/crates/relayer-types/src/applications/transfer/acknowledgement.rs +++ b/crates/relayer-types/src/applications/transfer/acknowledgement.rs @@ -1,9 +1,7 @@ -use core::fmt::{Display, Error as FmtError, Formatter}; +use std::fmt::{Display, Error as FmtError, Formatter}; use serde::{Deserialize, Serialize}; -use crate::prelude::*; - use super::error::Error; /// A string constant included in error acknowledgements. diff --git a/crates/relayer-types/src/applications/transfer/amount.rs b/crates/relayer-types/src/applications/transfer/amount.rs index 110f7b35f3..ff52510a8e 100644 --- a/crates/relayer-types/src/applications/transfer/amount.rs +++ b/crates/relayer-types/src/applications/transfer/amount.rs @@ -1,12 +1,11 @@ -use core::iter::Sum; -use core::ops::Add; -use core::str::FromStr; use derive_more::{Display, From, Into}; use serde::{Deserialize, Serialize}; +use std::iter::Sum; +use std::ops::Add; +use std::str::FromStr; use super::error::Error; use crate::bigint::U256; -use crate::prelude::*; /// A type for representing token transfer amounts. #[derive( diff --git a/crates/relayer-types/src/applications/transfer/coin.rs b/crates/relayer-types/src/applications/transfer/coin.rs index 0e0e0df938..29d5d4d91d 100644 --- a/crates/relayer-types/src/applications/transfer/coin.rs +++ b/crates/relayer-types/src/applications/transfer/coin.rs @@ -1,13 +1,12 @@ -use core::fmt::{Display, Error as FmtError, Formatter}; -use core::str::{from_utf8, FromStr}; use ibc_proto::cosmos::base::v1beta1::Coin as ProtoCoin; use safe_regex::regex; use serde::{Deserialize, Serialize}; +use std::fmt::{Display, Error as FmtError, Formatter}; +use std::str::{from_utf8, FromStr}; use super::amount::Amount; use super::denom::{BaseDenom, PrefixedDenom}; use super::error::Error; -use crate::prelude::*; use crate::serializers::serde_string; /// A `Coin` type with fully qualified `PrefixedDenom`. diff --git a/crates/relayer-types/src/applications/transfer/denom.rs b/crates/relayer-types/src/applications/transfer/denom.rs index 7fea3bfb05..dbc5a4cd3a 100644 --- a/crates/relayer-types/src/applications/transfer/denom.rs +++ b/crates/relayer-types/src/applications/transfer/denom.rs @@ -1,5 +1,5 @@ -use core::fmt::{Display, Error as FmtError, Formatter}; -use core::str::FromStr; +use std::fmt::{Display, Error as FmtError, Formatter}; +use std::str::FromStr; use derive_more::{Display, From}; use ibc_proto::ibc::applications::transfer::v1::DenomTrace as RawDenomTrace; @@ -7,7 +7,6 @@ use serde::{Deserialize, Serialize}; use super::error::Error; use crate::core::ics24_host::identifier::{ChannelId, PortId}; -use crate::prelude::*; use crate::serializers::serde_string; /// Base denomination type diff --git a/crates/relayer-types/src/applications/transfer/error.rs b/crates/relayer-types/src/applications/transfer/error.rs index aad0522a3e..ba4f26aa31 100644 --- a/crates/relayer-types/src/applications/transfer/error.rs +++ b/crates/relayer-types/src/applications/transfer/error.rs @@ -1,8 +1,8 @@ -use alloc::string::FromUtf8Error; -use core::convert::Infallible; -use core::str::Utf8Error; use flex_error::{define_error, DisplayOnly, TraceError}; use ibc_proto::protobuf::Error as TendermintProtoError; +use std::convert::Infallible; +use std::str::Utf8Error; +use std::string::FromUtf8Error; use subtle_encoding::Error as EncodingError; use uint::FromDecStrErr; @@ -11,7 +11,6 @@ use crate::core::ics04_channel::error as channel_error; use crate::core::ics04_channel::version::Version; use crate::core::ics24_host::error::ValidationError; use crate::core::ics24_host::identifier::{ChannelId, PortId}; -use crate::prelude::*; use crate::signer::SignerError; define_error! { diff --git a/crates/relayer-types/src/applications/transfer/events.rs b/crates/relayer-types/src/applications/transfer/events.rs index 590638f448..4f16e5297a 100644 --- a/crates/relayer-types/src/applications/transfer/events.rs +++ b/crates/relayer-types/src/applications/transfer/events.rs @@ -1,7 +1,7 @@ use crate::applications::transfer::acknowledgement::Acknowledgement; use crate::applications::transfer::{Amount, PrefixedDenom, MODULE_ID_STR}; use crate::events::ModuleEvent; -use crate::prelude::*; + use crate::signer::Signer; const EVENT_TYPE_PACKET: &str = "fungible_token_packet"; diff --git a/crates/relayer-types/src/applications/transfer/msgs/transfer.rs b/crates/relayer-types/src/applications/transfer/msgs/transfer.rs index e6a051deb7..ffdbdc22e9 100644 --- a/crates/relayer-types/src/applications/transfer/msgs/transfer.rs +++ b/crates/relayer-types/src/applications/transfer/msgs/transfer.rs @@ -1,7 +1,5 @@ //! This is the definition of a transfer messages that an application submits to a chain. -use crate::prelude::*; - use ibc_proto::cosmos::base::v1beta1::Coin; use ibc_proto::google::protobuf::Any; use ibc_proto::ibc::applications::transfer::v1::MsgTransfer as RawMsgTransfer; diff --git a/crates/relayer-types/src/applications/transfer/packet.rs b/crates/relayer-types/src/applications/transfer/packet.rs index 1340e719f6..c467542fe4 100644 --- a/crates/relayer-types/src/applications/transfer/packet.rs +++ b/crates/relayer-types/src/applications/transfer/packet.rs @@ -1,6 +1,6 @@ -use alloc::string::{String, ToString}; -use core::convert::TryFrom; -use core::str::FromStr; +use std::convert::TryFrom; +use std::str::FromStr; +use std::string::{String, ToString}; use ibc_proto::ibc::applications::transfer::v2::FungibleTokenPacketData as RawPacketData; use serde::{Deserialize, Serialize}; diff --git a/crates/relayer-types/src/clients/ics07_tendermint/client_state.rs b/crates/relayer-types/src/clients/ics07_tendermint/client_state.rs index 16d467f692..0e0f800653 100644 --- a/crates/relayer-types/src/clients/ics07_tendermint/client_state.rs +++ b/crates/relayer-types/src/clients/ics07_tendermint/client_state.rs @@ -1,5 +1,5 @@ -use core::convert::{TryFrom, TryInto}; -use core::time::Duration; +use std::convert::{TryFrom, TryInto}; +use std::time::Duration; use prost::Message; use serde::{Deserialize, Serialize}; @@ -21,7 +21,6 @@ use crate::core::ics02_client::error::Error as Ics02Error; use crate::core::ics02_client::trust_threshold::TrustThreshold; use crate::core::ics23_commitment::specs::ProofSpecs; use crate::core::ics24_host::identifier::ChainId; -use crate::prelude::*; use crate::timestamp::{Timestamp, ZERO_DURATION}; use crate::Height; @@ -368,7 +367,7 @@ impl From for Any { #[cfg(test)] mod tests { - use crate::prelude::*; + use crate::Height; use core::time::Duration; use test_log::test; @@ -673,7 +672,6 @@ mod tests { #[cfg(any(test, feature = "mocks"))] pub mod test_util { - use crate::prelude::*; use core::time::Duration; use tendermint::block::Header; diff --git a/crates/relayer-types/src/clients/ics07_tendermint/consensus_state.rs b/crates/relayer-types/src/clients/ics07_tendermint/consensus_state.rs index 1486f6e857..6ba3fceba6 100644 --- a/crates/relayer-types/src/clients/ics07_tendermint/consensus_state.rs +++ b/crates/relayer-types/src/clients/ics07_tendermint/consensus_state.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - use ibc_proto::google::protobuf::Any; use ibc_proto::ibc::lightclients::tendermint::v1::ConsensusState as RawConsensusState; use ibc_proto::protobuf::Protobuf; diff --git a/crates/relayer-types/src/clients/ics07_tendermint/error.rs b/crates/relayer-types/src/clients/ics07_tendermint/error.rs index 064763b908..d56731a8b3 100644 --- a/crates/relayer-types/src/clients/ics07_tendermint/error.rs +++ b/crates/relayer-types/src/clients/ics07_tendermint/error.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - use flex_error::{define_error, TraceError}; use crate::core::ics02_client::error::Error as Ics02Error; diff --git a/crates/relayer-types/src/clients/ics07_tendermint/header.rs b/crates/relayer-types/src/clients/ics07_tendermint/header.rs index cb8a4bd282..a361d66737 100644 --- a/crates/relayer-types/src/clients/ics07_tendermint/header.rs +++ b/crates/relayer-types/src/clients/ics07_tendermint/header.rs @@ -1,5 +1,4 @@ -use alloc::string::ToString; -use core::fmt::{Display, Error as FmtError, Formatter}; +use std::fmt::{Display, Error as FmtError, Formatter}; use bytes::Buf; use ibc_proto::google::protobuf::Any; @@ -150,7 +149,6 @@ impl From
for RawHeader { #[cfg(any(test, feature = "mocks"))] pub mod test_util { - use alloc::vec; use subtle_encoding::hex; use tendermint::block::signed_header::SignedHeader; diff --git a/crates/relayer-types/src/clients/ics07_tendermint/misbehaviour.rs b/crates/relayer-types/src/clients/ics07_tendermint/misbehaviour.rs index afe161cfd2..3668563bda 100644 --- a/crates/relayer-types/src/clients/ics07_tendermint/misbehaviour.rs +++ b/crates/relayer-types/src/clients/ics07_tendermint/misbehaviour.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - use ibc_proto::ibc::lightclients::tendermint::v1::Misbehaviour as RawMisbehaviour; use ibc_proto::protobuf::Protobuf; use serde::{Deserialize, Serialize}; diff --git a/crates/relayer-types/src/core/ics02_client/client_state.rs b/crates/relayer-types/src/core/ics02_client/client_state.rs index 268cc76eda..08c6e5677c 100644 --- a/crates/relayer-types/src/core/ics02_client/client_state.rs +++ b/crates/relayer-types/src/core/ics02_client/client_state.rs @@ -1,5 +1,5 @@ -use core::marker::{Send, Sync}; -use core::time::Duration; +use std::marker::{Send, Sync}; +use std::time::Duration; use dyn_clone::DynClone; use erased_serde::Serialize as ErasedSerialize; @@ -10,7 +10,7 @@ use crate::core::ics02_client::client_type::ClientType; use crate::core::ics02_client::error::Error; use crate::core::ics24_host::identifier::ChainId; use crate::dynamic_typing::AsAny; -use crate::prelude::*; + use crate::Height; use super::consensus_state::ConsensusState; diff --git a/crates/relayer-types/src/core/ics02_client/client_type.rs b/crates/relayer-types/src/core/ics02_client/client_type.rs index 22b6657f13..a35e44604d 100644 --- a/crates/relayer-types/src/core/ics02_client/client_type.rs +++ b/crates/relayer-types/src/core/ics02_client/client_type.rs @@ -1,6 +1,5 @@ -use crate::prelude::*; -use core::fmt::{Display, Error as FmtError, Formatter}; use serde_derive::{Deserialize, Serialize}; +use std::fmt::{Display, Error as FmtError, Formatter}; use super::error::Error; diff --git a/crates/relayer-types/src/core/ics02_client/consensus_state.rs b/crates/relayer-types/src/core/ics02_client/consensus_state.rs index 4d7c0adac3..2e17d56594 100644 --- a/crates/relayer-types/src/core/ics02_client/consensus_state.rs +++ b/crates/relayer-types/src/core/ics02_client/consensus_state.rs @@ -1,6 +1,4 @@ -use crate::prelude::*; - -use core::marker::{Send, Sync}; +use std::marker::{Send, Sync}; use dyn_clone::DynClone; use erased_serde::Serialize as ErasedSerialize; diff --git a/crates/relayer-types/src/core/ics02_client/error.rs b/crates/relayer-types/src/core/ics02_client/error.rs index 0770ca64e6..c01dd19714 100644 --- a/crates/relayer-types/src/core/ics02_client/error.rs +++ b/crates/relayer-types/src/core/ics02_client/error.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - use flex_error::{define_error, TraceError}; use ibc_proto::protobuf::Error as TendermintProtoError; diff --git a/crates/relayer-types/src/core/ics02_client/events.rs b/crates/relayer-types/src/core/ics02_client/events.rs index 83227c3423..455457fffc 100644 --- a/crates/relayer-types/src/core/ics02_client/events.rs +++ b/crates/relayer-types/src/core/ics02_client/events.rs @@ -1,7 +1,7 @@ //! Types for the IBC events emitted from Tendermint Websocket by the client module. -use core::fmt::{Display, Error as FmtError, Formatter}; use serde_derive::{Deserialize, Serialize}; +use std::fmt::{Display, Error as FmtError, Formatter}; use tendermint::abci; use super::header::Header; @@ -9,7 +9,6 @@ use crate::core::ics02_client::client_type::ClientType; use crate::core::ics02_client::height::Height; use crate::core::ics24_host::identifier::ClientId; use crate::events::{IbcEvent, IbcEventType}; -use crate::prelude::*; /// The content of the `key` field for the attribute containing the client identifier. pub const CLIENT_ID_ATTRIBUTE_KEY: &str = "client_id"; diff --git a/crates/relayer-types/src/core/ics02_client/header.rs b/crates/relayer-types/src/core/ics02_client/header.rs index 99f05c886b..da2184d2b9 100644 --- a/crates/relayer-types/src/core/ics02_client/header.rs +++ b/crates/relayer-types/src/core/ics02_client/header.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - use dyn_clone::DynClone; use erased_serde::Serialize as ErasedSerialize; use ibc_proto::google::protobuf::Any; diff --git a/crates/relayer-types/src/core/ics02_client/height.rs b/crates/relayer-types/src/core/ics02_client/height.rs index 2d9d468262..74c62208c2 100644 --- a/crates/relayer-types/src/core/ics02_client/height.rs +++ b/crates/relayer-types/src/core/ics02_client/height.rs @@ -1,8 +1,7 @@ -use crate::prelude::*; -use core::cmp::Ordering; +use std::cmp::Ordering; -use core::num::ParseIntError; -use core::str::FromStr; +use std::num::ParseIntError; +use std::str::FromStr; use flex_error::{define_error, TraceError}; use ibc_proto::protobuf::Protobuf; diff --git a/crates/relayer-types/src/core/ics02_client/misbehaviour.rs b/crates/relayer-types/src/core/ics02_client/misbehaviour.rs index be2acfc424..2905ab8a68 100644 --- a/crates/relayer-types/src/core/ics02_client/misbehaviour.rs +++ b/crates/relayer-types/src/core/ics02_client/misbehaviour.rs @@ -1,7 +1,6 @@ use dyn_clone::DynClone; use crate::dynamic_typing::AsAny; -use crate::prelude::*; use crate::core::ics24_host::identifier::ClientId; use crate::Height; diff --git a/crates/relayer-types/src/core/ics02_client/msgs/create_client.rs b/crates/relayer-types/src/core/ics02_client/msgs/create_client.rs index 496e28638d..8e94a1af1c 100644 --- a/crates/relayer-types/src/core/ics02_client/msgs/create_client.rs +++ b/crates/relayer-types/src/core/ics02_client/msgs/create_client.rs @@ -1,7 +1,5 @@ //! Definition of domain type message `MsgCreateClient`. -use crate::prelude::*; - use ibc_proto::google::protobuf::Any; use ibc_proto::ibc::core::client::v1::MsgCreateClient as RawMsgCreateClient; use ibc_proto::protobuf::Protobuf; diff --git a/crates/relayer-types/src/core/ics02_client/msgs/misbehaviour.rs b/crates/relayer-types/src/core/ics02_client/msgs/misbehaviour.rs index 07923bae8f..b62abcf69a 100644 --- a/crates/relayer-types/src/core/ics02_client/msgs/misbehaviour.rs +++ b/crates/relayer-types/src/core/ics02_client/msgs/misbehaviour.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - use ibc_proto::google::protobuf::Any as ProtoAny; use ibc_proto::ibc::core::client::v1::MsgSubmitMisbehaviour as RawMsgSubmitMisbehaviour; use ibc_proto::protobuf::Protobuf; diff --git a/crates/relayer-types/src/core/ics02_client/msgs/update_client.rs b/crates/relayer-types/src/core/ics02_client/msgs/update_client.rs index dcc3dc9753..8e457266d4 100644 --- a/crates/relayer-types/src/core/ics02_client/msgs/update_client.rs +++ b/crates/relayer-types/src/core/ics02_client/msgs/update_client.rs @@ -1,7 +1,5 @@ //! Definition of domain type message `MsgUpdateAnyClient`. -use crate::prelude::*; - use ibc_proto::google::protobuf::Any; use ibc_proto::ibc::core::client::v1::MsgUpdateClient as RawMsgUpdateClient; use ibc_proto::protobuf::Protobuf; diff --git a/crates/relayer-types/src/core/ics02_client/msgs/upgrade_client.rs b/crates/relayer-types/src/core/ics02_client/msgs/upgrade_client.rs index f8d1b9fa17..63cd606a41 100644 --- a/crates/relayer-types/src/core/ics02_client/msgs/upgrade_client.rs +++ b/crates/relayer-types/src/core/ics02_client/msgs/upgrade_client.rs @@ -1,8 +1,6 @@ //! Definition of domain type msg `MsgUpgradeAnyClient`. -use crate::prelude::*; - -use core::str::FromStr; +use std::str::FromStr; use ibc_proto::google::protobuf::Any; use ibc_proto::ibc::core::client::v1::MsgUpgradeClient as RawMsgUpgradeClient; diff --git a/crates/relayer-types/src/core/ics02_client/trust_threshold.rs b/crates/relayer-types/src/core/ics02_client/trust_threshold.rs index 02e131f567..73444f4651 100644 --- a/crates/relayer-types/src/core/ics02_client/trust_threshold.rs +++ b/crates/relayer-types/src/core/ics02_client/trust_threshold.rs @@ -2,8 +2,8 @@ //! represented as a fraction with valid values in the //! range `[0, 1)`. -use core::convert::TryFrom; -use core::fmt::{Display, Error as FmtError, Formatter}; +use std::convert::TryFrom; +use std::fmt::{Display, Error as FmtError, Formatter}; use ibc_proto::protobuf::Protobuf; use num_rational::Ratio; diff --git a/crates/relayer-types/src/core/ics03_connection/connection.rs b/crates/relayer-types/src/core/ics03_connection/connection.rs index 7b0a84afaf..a73a692949 100644 --- a/crates/relayer-types/src/core/ics03_connection/connection.rs +++ b/crates/relayer-types/src/core/ics03_connection/connection.rs @@ -1,8 +1,6 @@ -use crate::prelude::*; - -use core::str::FromStr; -use core::time::Duration; -use core::{ +use std::str::FromStr; +use std::time::Duration; +use std::{ fmt::{Display, Error as FmtError, Formatter}, u64, }; diff --git a/crates/relayer-types/src/core/ics03_connection/events.rs b/crates/relayer-types/src/core/ics03_connection/events.rs index 6618666781..5fddc6cfad 100644 --- a/crates/relayer-types/src/core/ics03_connection/events.rs +++ b/crates/relayer-types/src/core/ics03_connection/events.rs @@ -1,12 +1,11 @@ //! Types for the IBC events emitted from Tendermint Websocket by the connection module. -use core::fmt::{Display, Error as FmtError, Formatter}; use serde_derive::{Deserialize, Serialize}; +use std::fmt::{Display, Error as FmtError, Formatter}; use tendermint::abci; use crate::core::ics24_host::identifier::{ClientId, ConnectionId}; use crate::events::{IbcEvent, IbcEventType}; -use crate::prelude::*; /// The content of the `key` field for the attribute containing the connection identifier. pub const CONN_ID_ATTRIBUTE_KEY: &str = "connection_id"; diff --git a/crates/relayer-types/src/core/ics03_connection/msgs.rs b/crates/relayer-types/src/core/ics03_connection/msgs.rs index ab2cbec661..74a6af44b9 100644 --- a/crates/relayer-types/src/core/ics03_connection/msgs.rs +++ b/crates/relayer-types/src/core/ics03_connection/msgs.rs @@ -16,7 +16,6 @@ use crate::core::ics03_connection::msgs::conn_open_ack::MsgConnectionOpenAck; use crate::core::ics03_connection::msgs::conn_open_confirm::MsgConnectionOpenConfirm; use crate::core::ics03_connection::msgs::conn_open_init::MsgConnectionOpenInit; use crate::core::ics03_connection::msgs::conn_open_try::MsgConnectionOpenTry; -use alloc::boxed::Box; pub mod conn_open_ack; pub mod conn_open_confirm; @@ -36,7 +35,7 @@ pub enum ConnectionMsg { pub mod test_util { use crate::core::ics24_host::identifier::{ClientId, ConnectionId}; - use crate::prelude::*; + use ibc_proto::ibc::core::commitment::v1::MerklePrefix; use ibc_proto::ibc::core::connection::v1::Counterparty as RawCounterparty; diff --git a/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_ack.rs b/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_ack.rs index 060914b442..ca35efe957 100644 --- a/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_ack.rs +++ b/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_ack.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - use ibc_proto::google::protobuf::Any; use ibc_proto::ibc::core::connection::v1::MsgConnectionOpenAck as RawMsgConnectionOpenAck; use ibc_proto::protobuf::Protobuf; @@ -126,7 +124,7 @@ impl From for RawMsgConnectionOpenAck { #[cfg(test)] pub mod test_util { - use crate::prelude::*; + use ibc_proto::ibc::core::client::v1::Height; use ibc_proto::ibc::core::connection::v1::MsgConnectionOpenAck as RawMsgConnectionOpenAck; @@ -161,7 +159,6 @@ pub mod test_util { #[cfg(test)] mod tests { - use crate::prelude::*; use test_log::test; diff --git a/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_confirm.rs b/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_confirm.rs index 750b8ec168..6971415e91 100644 --- a/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_confirm.rs +++ b/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_confirm.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - use ibc_proto::protobuf::Protobuf; use ibc_proto::ibc::core::connection::v1::MsgConnectionOpenConfirm as RawMsgConnectionOpenConfirm; @@ -77,7 +75,7 @@ impl From for RawMsgConnectionOpenConfirm { #[cfg(test)] pub mod test_util { - use crate::prelude::*; + use ibc_proto::ibc::core::client::v1::Height; use ibc_proto::ibc::core::connection::v1::MsgConnectionOpenConfirm as RawMsgConnectionOpenConfirm; @@ -98,7 +96,6 @@ pub mod test_util { #[cfg(test)] mod tests { - use crate::prelude::*; use test_log::test; diff --git a/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_init.rs b/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_init.rs index b48bf3f2ce..0e1cb7fe3c 100644 --- a/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_init.rs +++ b/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_init.rs @@ -1,6 +1,4 @@ -use crate::prelude::*; - -use core::time::Duration; +use std::time::Duration; use ibc_proto::ibc::core::connection::v1::MsgConnectionOpenInit as RawMsgConnectionOpenInit; use ibc_proto::protobuf::Protobuf; @@ -72,7 +70,7 @@ impl From for RawMsgConnectionOpenInit { #[cfg(test)] pub mod test_util { - use crate::prelude::*; + use ibc_proto::ibc::core::connection::v1::MsgConnectionOpenInit as RawMsgConnectionOpenInit; use crate::core::ics03_connection::msgs::conn_open_init::MsgConnectionOpenInit; @@ -104,7 +102,6 @@ pub mod test_util { #[cfg(test)] mod tests { - use crate::prelude::*; use test_log::test; diff --git a/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_try.rs b/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_try.rs index a70159b7bb..bd768a36c0 100644 --- a/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_try.rs +++ b/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_try.rs @@ -1,6 +1,4 @@ -use crate::prelude::*; - -use core::{ +use std::{ convert::{TryFrom, TryInto}, str::FromStr, time::Duration, @@ -163,7 +161,7 @@ impl From for RawMsgConnectionOpenTry { #[cfg(test)] pub mod test_util { - use crate::prelude::*; + use ibc_proto::ibc::core::client::v1::Height; use ibc_proto::ibc::core::connection::v1::MsgConnectionOpenTry as RawMsgConnectionOpenTry; @@ -229,7 +227,6 @@ pub mod test_util { #[cfg(test)] mod tests { - use crate::prelude::*; use test_log::test; diff --git a/crates/relayer-types/src/core/ics03_connection/version.rs b/crates/relayer-types/src/core/ics03_connection/version.rs index a3123afa32..5e747575d2 100644 --- a/crates/relayer-types/src/core/ics03_connection/version.rs +++ b/crates/relayer-types/src/core/ics03_connection/version.rs @@ -1,6 +1,5 @@ -use core::fmt::Display; +use std::fmt::Display; -use crate::prelude::*; use crate::utils::pretty::PrettySlice; use ibc_proto::ibc::core::connection::v1::Version as RawVersion; @@ -111,7 +110,6 @@ pub fn pick_version( #[cfg(test)] mod tests { - use crate::prelude::*; use test_log::test; diff --git a/crates/relayer-types/src/core/ics04_channel/channel.rs b/crates/relayer-types/src/core/ics04_channel/channel.rs index b1f7b2162e..dc57f69893 100644 --- a/crates/relayer-types/src/core/ics04_channel/channel.rs +++ b/crates/relayer-types/src/core/ics04_channel/channel.rs @@ -1,8 +1,7 @@ -use crate::prelude::*; use crate::utils::pretty::PrettySlice; -use core::fmt::{Display, Error as FmtError, Formatter}; -use core::str::FromStr; +use std::fmt::{Display, Error as FmtError, Formatter}; +use std::str::FromStr; use ibc_proto::protobuf::Protobuf; use serde::{Deserialize, Serialize}; @@ -439,7 +438,7 @@ impl Display for State { #[cfg(test)] pub mod test_util { use crate::core::ics24_host::identifier::{ChannelId, ConnectionId, PortId}; - use crate::prelude::*; + use ibc_proto::ibc::core::channel::v1::Channel as RawChannel; use ibc_proto::ibc::core::channel::v1::Counterparty as RawCounterparty; @@ -466,7 +465,6 @@ pub mod test_util { #[cfg(test)] mod tests { - use crate::prelude::*; use core::str::FromStr; use test_log::test; diff --git a/crates/relayer-types/src/core/ics04_channel/commitment.rs b/crates/relayer-types/src/core/ics04_channel/commitment.rs index 62f13bc4ea..f3e3815240 100644 --- a/crates/relayer-types/src/core/ics04_channel/commitment.rs +++ b/crates/relayer-types/src/core/ics04_channel/commitment.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - use serde_derive::{Deserialize, Serialize}; /// Packet commitment diff --git a/crates/relayer-types/src/core/ics04_channel/error.rs b/crates/relayer-types/src/core/ics04_channel/error.rs index 64f7ccfd72..ce07b27fca 100644 --- a/crates/relayer-types/src/core/ics04_channel/error.rs +++ b/crates/relayer-types/src/core/ics04_channel/error.rs @@ -5,7 +5,7 @@ use crate::core::ics03_connection::error as connection_error; use crate::core::ics04_channel::channel::State; use crate::core::ics24_host::error::ValidationError; use crate::core::ics24_host::identifier::{ChannelId, ClientId, ConnectionId, PortId}; -use crate::prelude::*; + use crate::proofs::ProofError; use crate::signer::SignerError; use crate::timestamp::Timestamp; diff --git a/crates/relayer-types/src/core/ics04_channel/events.rs b/crates/relayer-types/src/core/ics04_channel/events.rs index 0d0c870e58..c902572dd3 100644 --- a/crates/relayer-types/src/core/ics04_channel/events.rs +++ b/crates/relayer-types/src/core/ics04_channel/events.rs @@ -1,15 +1,15 @@ //! Types for the IBC events emitted from Tendermint Websocket by the channels module. -use core::fmt::{Display, Error as FmtError, Formatter}; -use core::str; use serde_derive::{Deserialize, Serialize}; +use std::fmt::{Display, Error as FmtError, Formatter}; +use std::str; use tendermint::abci; use crate::core::ics04_channel::error::Error; use crate::core::ics04_channel::packet::Packet; use crate::core::ics24_host::identifier::{ChannelId, ConnectionId, PortId}; use crate::events::{Error as EventError, IbcEvent, IbcEventType}; -use crate::prelude::*; + use crate::utils::pretty::PrettySlice; /// Channel event attribute keys diff --git a/crates/relayer-types/src/core/ics04_channel/msgs/acknowledgement.rs b/crates/relayer-types/src/core/ics04_channel/msgs/acknowledgement.rs index 14129cd67b..0494bc0361 100644 --- a/crates/relayer-types/src/core/ics04_channel/msgs/acknowledgement.rs +++ b/crates/relayer-types/src/core/ics04_channel/msgs/acknowledgement.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - use derive_more::{From, Into}; use ibc_proto::ibc::core::channel::v1::MsgAcknowledgement as RawMsgAcknowledgement; use ibc_proto::protobuf::Protobuf; @@ -155,7 +153,6 @@ pub mod test_util { #[cfg(test)] mod test { - use crate::prelude::*; use test_log::test; diff --git a/crates/relayer-types/src/core/ics04_channel/msgs/chan_close_confirm.rs b/crates/relayer-types/src/core/ics04_channel/msgs/chan_close_confirm.rs index ce53866ab1..131f27dc57 100644 --- a/crates/relayer-types/src/core/ics04_channel/msgs/chan_close_confirm.rs +++ b/crates/relayer-types/src/core/ics04_channel/msgs/chan_close_confirm.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - use ibc_proto::protobuf::Protobuf; use ibc_proto::ibc::core::channel::v1::MsgChannelCloseConfirm as RawMsgChannelCloseConfirm; @@ -92,7 +90,7 @@ impl From for RawMsgChannelCloseConfirm { #[cfg(test)] pub mod test_util { - use crate::prelude::*; + use ibc_proto::ibc::core::channel::v1::MsgChannelCloseConfirm as RawMsgChannelCloseConfirm; use ibc_proto::ibc::core::client::v1::Height; @@ -116,7 +114,6 @@ pub mod test_util { #[cfg(test)] mod tests { - use crate::prelude::*; use ibc_proto::ibc::core::channel::v1::MsgChannelCloseConfirm as RawMsgChannelCloseConfirm; use ibc_proto::ibc::core::client::v1::Height; diff --git a/crates/relayer-types/src/core/ics04_channel/msgs/chan_close_init.rs b/crates/relayer-types/src/core/ics04_channel/msgs/chan_close_init.rs index 20e3f25043..49f5208795 100644 --- a/crates/relayer-types/src/core/ics04_channel/msgs/chan_close_init.rs +++ b/crates/relayer-types/src/core/ics04_channel/msgs/chan_close_init.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - use ibc_proto::protobuf::Protobuf; use ibc_proto::ibc::core::channel::v1::MsgChannelCloseInit as RawMsgChannelCloseInit; @@ -70,7 +68,7 @@ impl From for RawMsgChannelCloseInit { #[cfg(test)] pub mod test_util { - use crate::prelude::*; + use ibc_proto::ibc::core::channel::v1::MsgChannelCloseInit as RawMsgChannelCloseInit; use crate::core::ics24_host::identifier::{ChannelId, PortId}; @@ -88,7 +86,6 @@ pub mod test_util { #[cfg(test)] mod tests { - use crate::prelude::*; use test_log::test; diff --git a/crates/relayer-types/src/core/ics04_channel/msgs/chan_open_ack.rs b/crates/relayer-types/src/core/ics04_channel/msgs/chan_open_ack.rs index 6c8511705e..c95a1f0204 100644 --- a/crates/relayer-types/src/core/ics04_channel/msgs/chan_open_ack.rs +++ b/crates/relayer-types/src/core/ics04_channel/msgs/chan_open_ack.rs @@ -1,7 +1,7 @@ use crate::core::ics04_channel::error::Error; use crate::core::ics04_channel::version::Version; use crate::core::ics24_host::identifier::{ChannelId, PortId}; -use crate::prelude::*; + use crate::proofs::Proofs; use crate::signer::Signer; use crate::tx_msg::Msg; @@ -105,7 +105,7 @@ impl From for RawMsgChannelOpenAck { #[cfg(test)] pub mod test_util { - use crate::prelude::*; + use ibc_proto::ibc::core::channel::v1::MsgChannelOpenAck as RawMsgChannelOpenAck; use crate::core::ics24_host::identifier::{ChannelId, PortId}; @@ -131,7 +131,7 @@ pub mod test_util { #[cfg(test)] mod tests { - use crate::prelude::*; + use ibc_proto::ibc::core::channel::v1::MsgChannelOpenAck as RawMsgChannelOpenAck; use test_log::test; diff --git a/crates/relayer-types/src/core/ics04_channel/msgs/chan_open_confirm.rs b/crates/relayer-types/src/core/ics04_channel/msgs/chan_open_confirm.rs index fcbc1ffb1f..2bc80b8307 100644 --- a/crates/relayer-types/src/core/ics04_channel/msgs/chan_open_confirm.rs +++ b/crates/relayer-types/src/core/ics04_channel/msgs/chan_open_confirm.rs @@ -1,6 +1,6 @@ use crate::core::ics04_channel::error::Error; use crate::core::ics24_host::identifier::{ChannelId, PortId}; -use crate::prelude::*; + use crate::proofs::Proofs; use crate::signer::Signer; use crate::tx_msg::Msg; @@ -87,7 +87,7 @@ impl From for RawMsgChannelOpenConfirm { #[cfg(test)] pub mod test_util { - use crate::prelude::*; + use ibc_proto::ibc::core::channel::v1::MsgChannelOpenConfirm as RawMsgChannelOpenConfirm; use crate::core::ics24_host::identifier::{ChannelId, PortId}; @@ -111,7 +111,7 @@ pub mod test_util { #[cfg(test)] mod tests { - use crate::prelude::*; + use ibc_proto::ibc::core::channel::v1::MsgChannelOpenConfirm as RawMsgChannelOpenConfirm; use test_log::test; diff --git a/crates/relayer-types/src/core/ics04_channel/msgs/chan_open_init.rs b/crates/relayer-types/src/core/ics04_channel/msgs/chan_open_init.rs index f9ade01ac8..4b1920e72e 100644 --- a/crates/relayer-types/src/core/ics04_channel/msgs/chan_open_init.rs +++ b/crates/relayer-types/src/core/ics04_channel/msgs/chan_open_init.rs @@ -1,7 +1,7 @@ use crate::core::ics04_channel::channel::ChannelEnd; use crate::core::ics04_channel::error::Error; use crate::core::ics24_host::identifier::PortId; -use crate::prelude::*; + use crate::signer::Signer; use crate::tx_msg::Msg; @@ -72,7 +72,7 @@ impl From for RawMsgChannelOpenInit { #[cfg(test)] pub mod test_util { - use crate::prelude::*; + use ibc_proto::ibc::core::channel::v1::MsgChannelOpenInit as RawMsgChannelOpenInit; use crate::core::ics04_channel::channel::test_util::get_dummy_raw_channel_end; @@ -93,7 +93,6 @@ pub mod test_util { mod tests { use crate::core::ics04_channel::msgs::chan_open_init::test_util::get_dummy_raw_msg_chan_open_init; use crate::core::ics04_channel::msgs::chan_open_init::MsgChannelOpenInit; - use crate::prelude::*; use ibc_proto::ibc::core::channel::v1::MsgChannelOpenInit as RawMsgChannelOpenInit; use test_log::test; diff --git a/crates/relayer-types/src/core/ics04_channel/msgs/chan_open_try.rs b/crates/relayer-types/src/core/ics04_channel/msgs/chan_open_try.rs index 51e684ca65..22c1020d0d 100644 --- a/crates/relayer-types/src/core/ics04_channel/msgs/chan_open_try.rs +++ b/crates/relayer-types/src/core/ics04_channel/msgs/chan_open_try.rs @@ -3,7 +3,7 @@ use crate::core::ics04_channel::error::Error as ChannelError; use crate::core::ics04_channel::version::Version; use crate::core::ics24_host::error::ValidationError; use crate::core::ics24_host::identifier::{ChannelId, PortId}; -use crate::prelude::*; + use crate::proofs::Proofs; use crate::signer::Signer; use crate::tx_msg::Msg; @@ -134,7 +134,7 @@ impl From for RawMsgChannelOpenTry { #[cfg(test)] pub mod test_util { - use crate::prelude::*; + use ibc_proto::ibc::core::channel::v1::MsgChannelOpenTry as RawMsgChannelOpenTry; use crate::core::ics04_channel::channel::test_util::get_dummy_raw_channel_end; @@ -164,7 +164,6 @@ pub mod test_util { mod tests { use crate::core::ics04_channel::msgs::chan_open_try::test_util::get_dummy_raw_msg_chan_open_try; use crate::core::ics04_channel::msgs::chan_open_try::MsgChannelOpenTry; - use crate::prelude::*; use ibc_proto::ibc::core::channel::v1::MsgChannelOpenTry as RawMsgChannelOpenTry; use ibc_proto::ibc::core::client::v1::Height; diff --git a/crates/relayer-types/src/core/ics04_channel/msgs/recv_packet.rs b/crates/relayer-types/src/core/ics04_channel/msgs/recv_packet.rs index 274ffa3bb2..0abdbdf3c9 100644 --- a/crates/relayer-types/src/core/ics04_channel/msgs/recv_packet.rs +++ b/crates/relayer-types/src/core/ics04_channel/msgs/recv_packet.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - use ibc_proto::protobuf::Protobuf; use ibc_proto::ibc::core::channel::v1::MsgRecvPacket as RawMsgRecvPacket; @@ -120,7 +118,6 @@ pub mod test_util { #[cfg(test)] mod test { - use crate::prelude::*; use test_log::test; diff --git a/crates/relayer-types/src/core/ics04_channel/msgs/timeout.rs b/crates/relayer-types/src/core/ics04_channel/msgs/timeout.rs index 58d5761e9f..465a24636a 100644 --- a/crates/relayer-types/src/core/ics04_channel/msgs/timeout.rs +++ b/crates/relayer-types/src/core/ics04_channel/msgs/timeout.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - use ibc_proto::protobuf::Protobuf; use ibc_proto::ibc::core::channel::v1::MsgTimeout as RawMsgTimeout; @@ -129,7 +127,6 @@ pub mod test_util { #[cfg(test)] mod test { - use crate::prelude::*; use test_log::test; diff --git a/crates/relayer-types/src/core/ics04_channel/msgs/timeout_on_close.rs b/crates/relayer-types/src/core/ics04_channel/msgs/timeout_on_close.rs index 82b10928b1..d1de6e4988 100644 --- a/crates/relayer-types/src/core/ics04_channel/msgs/timeout_on_close.rs +++ b/crates/relayer-types/src/core/ics04_channel/msgs/timeout_on_close.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - use ibc_proto::ibc::core::channel::v1::MsgTimeoutOnClose as RawMsgTimeoutOnClose; use ibc_proto::protobuf::Protobuf; @@ -110,7 +108,7 @@ impl From for RawMsgTimeoutOnClose { #[cfg(test)] mod tests { - use crate::prelude::*; + use ibc_proto::ibc::core::channel::v1::MsgTimeoutOnClose as RawMsgTimeoutOnClose; use test_log::test; diff --git a/crates/relayer-types/src/core/ics04_channel/packet.rs b/crates/relayer-types/src/core/ics04_channel/packet.rs index 0a366e74d9..bd1630c1a3 100644 --- a/crates/relayer-types/src/core/ics04_channel/packet.rs +++ b/crates/relayer-types/src/core/ics04_channel/packet.rs @@ -1,6 +1,4 @@ -use crate::prelude::*; - -use core::str::FromStr; +use std::str::FromStr; use serde_derive::{Deserialize, Serialize}; @@ -263,7 +261,7 @@ impl From for RawPacket { #[cfg(test)] pub mod test_utils { - use crate::prelude::*; + use ibc_proto::ibc::core::channel::v1::Packet as RawPacket; use ibc_proto::ibc::core::client::v1::Height as RawHeight; @@ -289,7 +287,6 @@ pub mod test_utils { #[cfg(test)] mod tests { - use crate::prelude::*; use test_log::test; diff --git a/crates/relayer-types/src/core/ics04_channel/packet_id.rs b/crates/relayer-types/src/core/ics04_channel/packet_id.rs index 9acf5b3cf8..d492d0a80a 100644 --- a/crates/relayer-types/src/core/ics04_channel/packet_id.rs +++ b/crates/relayer-types/src/core/ics04_channel/packet_id.rs @@ -1,6 +1,6 @@ -use core::convert::TryFrom; -use core::str::FromStr; use ibc_proto::ibc::core::channel::v1::PacketId as ProtoPacketId; +use std::convert::TryFrom; +use std::str::FromStr; use crate::core::ics04_channel::error::Error; use crate::core::ics04_channel::packet::Sequence; diff --git a/crates/relayer-types/src/core/ics04_channel/timeout.rs b/crates/relayer-types/src/core/ics04_channel/timeout.rs index f9af21a514..076505ed49 100644 --- a/crates/relayer-types/src/core/ics04_channel/timeout.rs +++ b/crates/relayer-types/src/core/ics04_channel/timeout.rs @@ -1,11 +1,10 @@ -use core::fmt::{Display, Error as FmtError, Formatter}; +use std::fmt::{Display, Error as FmtError, Formatter}; use serde::{Deserialize, Serialize}; use ibc_proto::ibc::core::client::v1::Height as RawHeight; use crate::core::ics02_client::{error::Error as ICS2Error, height::Height}; -use crate::prelude::*; /// Indicates a consensus height on the destination chain after which the packet /// will no longer be processed, and will instead count as having timed-out. diff --git a/crates/relayer-types/src/core/ics04_channel/version.rs b/crates/relayer-types/src/core/ics04_channel/version.rs index 1ef2394455..4d15ae3d4b 100644 --- a/crates/relayer-types/src/core/ics04_channel/version.rs +++ b/crates/relayer-types/src/core/ics04_channel/version.rs @@ -2,14 +2,13 @@ //! version field of a channel end. //! -use core::convert::Infallible; -use core::fmt::{Display, Error as FmtError, Formatter}; -use core::str::FromStr; use serde_derive::{Deserialize, Serialize}; use serde_json as json; +use std::convert::Infallible; +use std::fmt::{Display, Error as FmtError, Formatter}; +use std::str::FromStr; use crate::applications::transfer; -use crate::prelude::*; /// The version field for a `ChannelEnd`. /// diff --git a/crates/relayer-types/src/core/ics23_commitment/commitment.rs b/crates/relayer-types/src/core/ics23_commitment/commitment.rs index 6b559d7517..de0eb472eb 100644 --- a/crates/relayer-types/src/core/ics23_commitment/commitment.rs +++ b/crates/relayer-types/src/core/ics23_commitment/commitment.rs @@ -1,10 +1,9 @@ -use core::{convert::TryFrom, fmt}; use serde::{Deserialize, Serialize}; +use std::{convert::TryFrom, fmt}; use subtle_encoding::{Encoding, Hex}; use ibc_proto::ibc::core::commitment::v1::MerkleProof as RawMerkleProof; -use crate::prelude::*; use crate::proofs::ProofError; use crate::tx_msg::encode_message; @@ -159,7 +158,7 @@ impl Serialize for CommitmentPrefix { #[cfg(test)] pub mod test_util { - use crate::prelude::*; + use ibc_proto::ibc::core::commitment::v1::MerkleProof as RawMerkleProof; use ibc_proto::ics23::CommitmentProof; diff --git a/crates/relayer-types/src/core/ics23_commitment/merkle.rs b/crates/relayer-types/src/core/ics23_commitment/merkle.rs index 55ac966f1c..603374812e 100644 --- a/crates/relayer-types/src/core/ics23_commitment/merkle.rs +++ b/crates/relayer-types/src/core/ics23_commitment/merkle.rs @@ -1,4 +1,3 @@ -use crate::prelude::*; use tendermint::merkle::proof::ProofOps as TendermintProof; use ibc_proto::ibc::core::commitment::v1::MerklePath; diff --git a/crates/relayer-types/src/core/ics23_commitment/specs.rs b/crates/relayer-types/src/core/ics23_commitment/specs.rs index 525a914984..75486c955e 100644 --- a/crates/relayer-types/src/core/ics23_commitment/specs.rs +++ b/crates/relayer-types/src/core/ics23_commitment/specs.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - use ics23::ProofSpec; use serde::{Deserialize, Serialize}; diff --git a/crates/relayer-types/src/core/ics24_host/error.rs b/crates/relayer-types/src/core/ics24_host/error.rs index 0221414211..11e6983fe6 100644 --- a/crates/relayer-types/src/core/ics24_host/error.rs +++ b/crates/relayer-types/src/core/ics24_host/error.rs @@ -1,8 +1,6 @@ use flex_error::define_error; use serde::Serialize; -use crate::prelude::*; - define_error! { #[derive(Debug, PartialEq, Eq, Serialize)] ValidationError { diff --git a/crates/relayer-types/src/core/ics24_host/identifier.rs b/crates/relayer-types/src/core/ics24_host/identifier.rs index d4fb6b0224..0b42b9a9f5 100644 --- a/crates/relayer-types/src/core/ics24_host/identifier.rs +++ b/crates/relayer-types/src/core/ics24_host/identifier.rs @@ -7,7 +7,6 @@ use serde::{Deserialize, Serialize}; use super::validate::*; use crate::core::ics02_client::client_type::ClientType; use crate::core::ics24_host::error::ValidationError; -use crate::prelude::*; /// This type is subject to future changes. /// diff --git a/crates/relayer-types/src/core/ics24_host/path.rs b/crates/relayer-types/src/core/ics24_host/path.rs index 8f63794b9f..327792825c 100644 --- a/crates/relayer-types/src/core/ics24_host/path.rs +++ b/crates/relayer-types/src/core/ics24_host/path.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - /// Path-space as listed in ICS-024 /// https://github.com/cosmos/ibc/tree/master/spec/core/ics-024-host-requirements#path-space /// Some of these are implemented in other ICSs, but ICS-024 has a nice summary table. diff --git a/crates/relayer-types/src/core/ics24_host/validate.rs b/crates/relayer-types/src/core/ics24_host/validate.rs index 0bc4163bb2..347bd379a9 100644 --- a/crates/relayer-types/src/core/ics24_host/validate.rs +++ b/crates/relayer-types/src/core/ics24_host/validate.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - use super::error::ValidationError as Error; /// Path separator (ie. forward slash '/') diff --git a/crates/relayer-types/src/core/ics26_routing/error.rs b/crates/relayer-types/src/core/ics26_routing/error.rs index c0d3c69c6d..5687860cf4 100644 --- a/crates/relayer-types/src/core/ics26_routing/error.rs +++ b/crates/relayer-types/src/core/ics26_routing/error.rs @@ -1,4 +1,3 @@ -use crate::prelude::*; use flex_error::{define_error, TraceError}; use crate::applications::transfer; diff --git a/crates/relayer-types/src/core/ics26_routing/msgs.rs b/crates/relayer-types/src/core/ics26_routing/msgs.rs index 5f3d581408..c6c7d72bda 100644 --- a/crates/relayer-types/src/core/ics26_routing/msgs.rs +++ b/crates/relayer-types/src/core/ics26_routing/msgs.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - use ibc_proto::google::protobuf::Any; use crate::core::ics02_client::msgs::{create_client, update_client, upgrade_client, ClientMsg}; diff --git a/crates/relayer-types/src/dynamic_typing.rs b/crates/relayer-types/src/dynamic_typing.rs index 22eb9e11be..7385b04ff5 100644 --- a/crates/relayer-types/src/dynamic_typing.rs +++ b/crates/relayer-types/src/dynamic_typing.rs @@ -1,4 +1,4 @@ -use core::any::Any; +use std::any::Any; pub trait AsAny: Any { fn as_any(&self) -> &dyn Any; diff --git a/crates/relayer-types/src/events.rs b/crates/relayer-types/src/events.rs index 5a962c266f..068b0fbaca 100644 --- a/crates/relayer-types/src/events.rs +++ b/crates/relayer-types/src/events.rs @@ -1,12 +1,11 @@ -use crate::prelude::*; use crate::utils::pretty::PrettySlice; -use alloc::borrow::Cow; -use core::convert::{TryFrom, TryInto}; -use core::fmt::{Display, Error as FmtError, Formatter}; -use core::str::FromStr; use flex_error::{define_error, TraceError}; use serde_derive::{Deserialize, Serialize}; +use std::borrow::Cow; +use std::convert::{TryFrom, TryInto}; +use std::fmt::{Display, Error as FmtError, Formatter}; +use std::str::FromStr; use tendermint::abci; use crate::applications::ics29_fee::error::Error as FeeError; diff --git a/crates/relayer-types/src/handler.rs b/crates/relayer-types/src/handler.rs index f8bf203ebb..781201912c 100644 --- a/crates/relayer-types/src/handler.rs +++ b/crates/relayer-types/src/handler.rs @@ -1,6 +1,6 @@ use crate::events::IbcEvent; -use crate::prelude::*; -use core::marker::PhantomData; + +use std::marker::PhantomData; pub type HandlerResult = Result, E>; diff --git a/crates/relayer-types/src/lib.rs b/crates/relayer-types/src/lib.rs index 6e8b43271f..33ef64cdf3 100644 --- a/crates/relayer-types/src/lib.rs +++ b/crates/relayer-types/src/lib.rs @@ -2,7 +2,6 @@ // https://github.com/informalsystems/hermes/issues/987 // #![cfg_attr(not(test), deny(clippy::unwrap_used))] -#![no_std] #![allow(clippy::large_enum_variant)] #![deny( // warnings, @@ -44,13 +43,6 @@ //! [relayer]: https://github.com/cosmos/ibc-rs/tree/main/crates/ibc/src/relayer //! [relayer-repo]: https://github.com/informalsystems/hermes/tree/master/crates/relayer -extern crate alloc; - -#[cfg(feature = "std")] -extern crate std; - -mod prelude; - pub mod applications; pub mod bigint; pub mod clients; diff --git a/crates/relayer-types/src/mock/client_state.rs b/crates/relayer-types/src/mock/client_state.rs index 8f25606796..e9ec98449d 100644 --- a/crates/relayer-types/src/mock/client_state.rs +++ b/crates/relayer-types/src/mock/client_state.rs @@ -1,5 +1,5 @@ -use alloc::collections::btree_map::BTreeMap as HashMap; use core::time::Duration; +use std::collections::HashMap; use serde::{Deserialize, Serialize}; @@ -16,7 +16,7 @@ use crate::core::ics24_host::identifier::ChainId; use crate::mock::consensus_state::MockConsensusState; use crate::mock::header::MockHeader; -use crate::prelude::*; + use crate::Height; pub const MOCK_CLIENT_STATE_TYPE_URL: &str = "/ibc.mock.ClientState"; diff --git a/crates/relayer-types/src/mock/consensus_state.rs b/crates/relayer-types/src/mock/consensus_state.rs index 92119664c9..5ee4ab94f6 100644 --- a/crates/relayer-types/src/mock/consensus_state.rs +++ b/crates/relayer-types/src/mock/consensus_state.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - use ibc_proto::google::protobuf::Any; use ibc_proto::ibc::mock::ConsensusState as RawMockConsensusState; use ibc_proto::protobuf::Protobuf; diff --git a/crates/relayer-types/src/mock/header.rs b/crates/relayer-types/src/mock/header.rs index adaa64ee46..a3e4189621 100644 --- a/crates/relayer-types/src/mock/header.rs +++ b/crates/relayer-types/src/mock/header.rs @@ -1,5 +1,4 @@ -use alloc::string::ToString; -use core::fmt::{Display, Error as FmtError, Formatter}; +use std::fmt::{Display, Error as FmtError, Formatter}; use ibc_proto::google::protobuf::Any; use ibc_proto::ibc::mock::Header as RawMockHeader; diff --git a/crates/relayer-types/src/mock/host.rs b/crates/relayer-types/src/mock/host.rs index f14d7c1095..631af7499e 100644 --- a/crates/relayer-types/src/mock/host.rs +++ b/crates/relayer-types/src/mock/host.rs @@ -17,7 +17,7 @@ use crate::core::ics02_client::header::Header; use crate::core::ics24_host::identifier::ChainId; use crate::mock::consensus_state::MockConsensusState; use crate::mock::header::MockHeader; -use crate::prelude::*; + use crate::timestamp::Timestamp; use crate::Height; diff --git a/crates/relayer-types/src/mock/misbehaviour.rs b/crates/relayer-types/src/mock/misbehaviour.rs index e75cdb3e10..418c187251 100644 --- a/crates/relayer-types/src/mock/misbehaviour.rs +++ b/crates/relayer-types/src/mock/misbehaviour.rs @@ -1,5 +1,3 @@ -use crate::prelude::*; - use ibc_proto::ibc::mock::Misbehaviour as RawMisbehaviour; use ibc_proto::protobuf::Protobuf; use serde::{Deserialize, Serialize}; diff --git a/crates/relayer-types/src/prelude.rs b/crates/relayer-types/src/prelude.rs deleted file mode 100644 index bdce26208e..0000000000 --- a/crates/relayer-types/src/prelude.rs +++ /dev/null @@ -1,15 +0,0 @@ -pub use core::prelude::v1::*; - -// Re-export according to alloc::prelude::v1 because it is not yet stabilized -// https://doc.rust-lang.org/src/alloc/prelude/v1.rs.html -pub use alloc::borrow::ToOwned; -pub use alloc::boxed::Box; -pub use alloc::string::{String, ToString}; -pub use alloc::vec::Vec; - -pub use alloc::format; -pub use alloc::vec; - -// Those are exported by default in the std prelude in Rust 2021 -pub use core::convert::{TryFrom, TryInto}; -pub use core::iter::FromIterator; diff --git a/crates/relayer-types/src/relayer/ics18_relayer/context.rs b/crates/relayer-types/src/relayer/ics18_relayer/context.rs index 50b4bc643e..c7a505914d 100644 --- a/crates/relayer-types/src/relayer/ics18_relayer/context.rs +++ b/crates/relayer-types/src/relayer/ics18_relayer/context.rs @@ -1,4 +1,3 @@ -use crate::prelude::*; use ibc_proto::google::protobuf::Any; use crate::core::ics02_client::client_state::ClientState; diff --git a/crates/relayer-types/src/serializers.rs b/crates/relayer-types/src/serializers.rs index bd6f346336..da3cce68d1 100644 --- a/crates/relayer-types/src/serializers.rs +++ b/crates/relayer-types/src/serializers.rs @@ -11,7 +11,7 @@ where } pub mod serde_string { - use alloc::string::String; + use core::fmt::Display; use core::str::FromStr; diff --git a/crates/relayer-types/src/signer.rs b/crates/relayer-types/src/signer.rs index cc536f210b..e016850c7d 100644 --- a/crates/relayer-types/src/signer.rs +++ b/crates/relayer-types/src/signer.rs @@ -1,11 +1,9 @@ -use core::str::FromStr; +use std::str::FromStr; use derive_more::Display; use flex_error::define_error; use serde::{Deserialize, Serialize}; -use crate::prelude::*; - define_error! { #[derive(Debug, PartialEq, Eq)] SignerError { diff --git a/crates/relayer-types/src/test_utils.rs b/crates/relayer-types/src/test_utils.rs index 4e783ccdcd..f02467cc53 100644 --- a/crates/relayer-types/src/test_utils.rs +++ b/crates/relayer-types/src/test_utils.rs @@ -1,6 +1,5 @@ use tendermint::{block, consensus, evidence, public_key::Algorithm}; -use crate::prelude::*; use crate::signer::Signer; // Needed in mocks. diff --git a/crates/relayer-types/src/timestamp.rs b/crates/relayer-types/src/timestamp.rs index c3d3668e29..0560a4ab53 100644 --- a/crates/relayer-types/src/timestamp.rs +++ b/crates/relayer-types/src/timestamp.rs @@ -1,11 +1,9 @@ -use crate::prelude::*; - -use core::fmt::{Display, Error as FmtError, Formatter}; -use core::hash::{Hash, Hasher}; -use core::num::ParseIntError; -use core::ops::{Add, Sub}; -use core::str::FromStr; -use core::time::Duration; +use std::fmt::{Display, Error as FmtError, Formatter}; +use std::hash::{Hash, Hasher}; +use std::num::ParseIntError; +use std::ops::{Add, Sub}; +use std::str::FromStr; +use std::time::Duration; use flex_error::{define_error, TraceError}; use serde_derive::{Deserialize, Serialize}; diff --git a/crates/relayer-types/src/tx_msg.rs b/crates/relayer-types/src/tx_msg.rs index c3ac9eea28..2608fe57c8 100644 --- a/crates/relayer-types/src/tx_msg.rs +++ b/crates/relayer-types/src/tx_msg.rs @@ -2,7 +2,6 @@ use ibc_proto::google::protobuf::Any; use prost::{EncodeError, Message}; use crate::core::ics24_host::error::ValidationError; -use crate::prelude::*; pub trait Msg: Clone { type ValidationError; diff --git a/crates/relayer-types/src/utils/pretty.rs b/crates/relayer-types/src/utils/pretty.rs index 8675658769..d2f2ab5f79 100644 --- a/crates/relayer-types/src/utils/pretty.rs +++ b/crates/relayer-types/src/utils/pretty.rs @@ -1,10 +1,8 @@ -use core::fmt::{Debug, Display, Error as FmtError, Formatter}; -use core::time::Duration; +use std::fmt::{Debug, Display, Error as FmtError, Formatter}; +use std::time::Duration; use tendermint::block::signed_header::SignedHeader; use tendermint::validator::Set as ValidatorSet; -use alloc::vec::Vec; - pub struct PrettyDuration<'a>(pub &'a Duration); impl Display for PrettyDuration<'_> { @@ -83,7 +81,6 @@ impl<'a, T: Display> Display for PrettySlice<'a, T> { mod tests { use super::*; - use crate::alloc::string::ToString; use std::{string::String, vec}; #[test] diff --git a/crates/relayer/src/link/operational_data.rs b/crates/relayer/src/link/operational_data.rs index fb62499463..2883e515ae 100644 --- a/crates/relayer/src/link/operational_data.rs +++ b/crates/relayer/src/link/operational_data.rs @@ -245,14 +245,14 @@ impl OperationalData { /// Sets the scheduled time that is used for connection-delay calculations pub fn set_scheduled_time(&mut self, scheduled_time: Instant) { - if let Some(mut delay) = self.connection_delay.as_mut() { + if let Some(delay) = self.connection_delay.as_mut() { delay.scheduled_time = scheduled_time; } } /// Sets the update height that is used for connection-delay calculations pub fn set_update_height(&mut self, update_height: Height) { - if let Some(mut delay) = self.connection_delay.as_mut() { + if let Some(delay) = self.connection_delay.as_mut() { delay.update_height = Some(update_height); } } diff --git a/tools/integration-test/src/bin/test_setup_with_binary_channel.rs b/tools/integration-test/src/bin/test_setup_with_binary_channel.rs index dcfb62fe01..d2710d2ee9 100644 --- a/tools/integration-test/src/bin/test_setup_with_binary_channel.rs +++ b/tools/integration-test/src/bin/test_setup_with_binary_channel.rs @@ -40,7 +40,7 @@ impl TestOverrides for Test { } fn modify_relayer_config(&self, config: &mut Config) { - for mut chain in config.chains.iter_mut() { + for chain in config.chains.iter_mut() { // Modify the key store type to `Store::Test` so that the wallet // keys are stored to ~/.hermes/keys so that we can use them // with external relayer commands. diff --git a/tools/integration-test/src/bin/test_setup_with_fee_enabled_binary_channel.rs b/tools/integration-test/src/bin/test_setup_with_fee_enabled_binary_channel.rs index 32fcbb63e0..77172a4c44 100644 --- a/tools/integration-test/src/bin/test_setup_with_fee_enabled_binary_channel.rs +++ b/tools/integration-test/src/bin/test_setup_with_fee_enabled_binary_channel.rs @@ -41,7 +41,7 @@ impl TestOverrides for Test { } fn modify_relayer_config(&self, config: &mut Config) { - for mut chain in config.chains.iter_mut() { + for chain in config.chains.iter_mut() { // Modify the key store type to `Store::Test` so that the wallet // keys are stored to ~/.hermes/keys so that we can use them // with external relayer commands. diff --git a/tools/integration-test/src/bin/test_setup_with_ternary_channel.rs b/tools/integration-test/src/bin/test_setup_with_ternary_channel.rs index b5ad07c54b..79b4914592 100644 --- a/tools/integration-test/src/bin/test_setup_with_ternary_channel.rs +++ b/tools/integration-test/src/bin/test_setup_with_ternary_channel.rs @@ -40,7 +40,7 @@ impl TestOverrides for Test { } fn modify_relayer_config(&self, config: &mut Config) { - for mut chain in config.chains.iter_mut() { + for chain in config.chains.iter_mut() { // Modify the key store type to `Store::Test` so that the wallet // keys are stored to ~/.hermes/keys so that we can use them // with external relayer commands. From b316d2eb2926410abded75d7d6336465548a4deb Mon Sep 17 00:00:00 2001 From: Davirain Date: Thu, 1 Jun 2023 20:33:06 +0800 Subject: [PATCH 2/5] fix use `std` replace `core` --- crates/relayer-cli/src/lib.rs | 2 +- crates/relayer-types/src/core/ics24_host/identifier.rs | 6 +++--- crates/relayer-types/src/core/ics24_host/path.rs | 2 +- crates/relayer-types/src/mock/client_state.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/relayer-cli/src/lib.rs b/crates/relayer-cli/src/lib.rs index 517b2cd7f7..428e79f7a9 100644 --- a/crates/relayer-cli/src/lib.rs +++ b/crates/relayer-cli/src/lib.rs @@ -17,7 +17,7 @@ rust_2018_idioms, trivial_casts, unused_lifetimes, - // unused_qualifications + unused_qualifications )] #![allow(deprecated)] diff --git a/crates/relayer-types/src/core/ics24_host/identifier.rs b/crates/relayer-types/src/core/ics24_host/identifier.rs index 0b42b9a9f5..a98696a982 100644 --- a/crates/relayer-types/src/core/ics24_host/identifier.rs +++ b/crates/relayer-types/src/core/ics24_host/identifier.rs @@ -1,6 +1,6 @@ -use core::convert::{From, Infallible}; -use core::fmt::{Debug, Display, Error as FmtError, Formatter}; -use core::str::FromStr; +use std::convert::{From, Infallible}; +use std::fmt::{Debug, Display, Error as FmtError, Formatter}; +use std::str::FromStr; use serde::{Deserialize, Serialize}; diff --git a/crates/relayer-types/src/core/ics24_host/path.rs b/crates/relayer-types/src/core/ics24_host/path.rs index 327792825c..300982d929 100644 --- a/crates/relayer-types/src/core/ics24_host/path.rs +++ b/crates/relayer-types/src/core/ics24_host/path.rs @@ -2,7 +2,7 @@ /// https://github.com/cosmos/ibc/tree/master/spec/core/ics-024-host-requirements#path-space /// Some of these are implemented in other ICSs, but ICS-024 has a nice summary table. /// -use core::str::FromStr; +use std::str::FromStr; use crate::core::ics04_channel::packet::Sequence; use crate::core::ics24_host::identifier::{ChannelId, ClientId, ConnectionId, PortId}; diff --git a/crates/relayer-types/src/mock/client_state.rs b/crates/relayer-types/src/mock/client_state.rs index e9ec98449d..320d15aafb 100644 --- a/crates/relayer-types/src/mock/client_state.rs +++ b/crates/relayer-types/src/mock/client_state.rs @@ -1,5 +1,5 @@ -use core::time::Duration; use std::collections::HashMap; +use std::time::Duration; use serde::{Deserialize, Serialize}; From fd3839a5e9cd8563db5a3b7b32bbb1f8d6145053 Mon Sep 17 00:00:00 2001 From: Romain Ruetschi Date: Mon, 5 Jun 2023 10:14:31 +0200 Subject: [PATCH 3/5] Revert addition of default features to some dependencies Signed-off-by: Romain Ruetschi --- crates/relayer-types/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/relayer-types/Cargo.toml b/crates/relayer-types/Cargo.toml index 1b9f5cc867..1451088d64 100644 --- a/crates/relayer-types/Cargo.toml +++ b/crates/relayer-types/Cargo.toml @@ -36,10 +36,10 @@ bytes = { version = "1.4.0" } safe-regex = { version = "0.2.5" } subtle-encoding = { version = "0.5" } flex-error = { version = "0.4.4" } -derive_more = { version = "0.99.17", features = ["from", "into", "display"] } +derive_more = { version = "0.99.17", default-features = false, features = ["from", "into", "display"] } uint = { version = "0.9" } itertools = { version = "0.10.3" } -primitive-types = { version = "0.12.1", features = ["serde_no_std"] } +primitive-types = { version = "0.12.1", default-features = false, features = ["serde_no_std"] } dyn-clone = "1.0.8" num-rational = "0.4.1" From ec006c91e46488b8ec07452113085614a0b7f900 Mon Sep 17 00:00:00 2001 From: Romain Ruetschi Date: Mon, 5 Jun 2023 10:15:04 +0200 Subject: [PATCH 4/5] Update Cargo.lock --- Cargo.lock | 125 ----------------------------------------------------- 1 file changed, 125 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7e9ad45f1a..cb148701b4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -92,12 +92,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" -[[package]] -name = "arrayvec" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" - [[package]] name = "async-stream" version = "0.3.5" @@ -294,18 +288,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - [[package]] name = "block-buffer" version = "0.9.0" @@ -339,12 +321,6 @@ version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" -[[package]] -name = "byte-slice-cast" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" - [[package]] name = "byte-unit" version = "4.0.19" @@ -551,12 +527,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - [[package]] name = "core-foundation" version = "0.9.3" @@ -733,10 +703,8 @@ version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "convert_case", "proc-macro2", "quote", - "rustc_version", "syn 1.0.109", ] @@ -1001,9 +969,6 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ - "byteorder", - "rand 0.8.5", - "rustc-hex", "static_assertions", ] @@ -1039,12 +1004,6 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541" -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - [[package]] name = "futures" version = "0.3.28" @@ -1779,15 +1738,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "impl-codec" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" -dependencies = [ - "parity-scale-codec", -] - [[package]] name = "impl-serde" version = "0.4.0" @@ -1797,17 +1747,6 @@ dependencies = [ "serde", ] -[[package]] -name = "impl-trait-for-tuples" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "indenter" version = "0.3.3" @@ -2221,32 +2160,6 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" -[[package]] -name = "parity-scale-codec" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ddb756ca205bd108aee3c62c6d3c994e1df84a59b9d6d4a5ea42ee1fd5a9a28" -dependencies = [ - "arrayvec", - "bitvec", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", -] - -[[package]] -name = "parity-scale-codec-derive" -version = "3.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b26a931f824dd4eca30b3e43bb4f31cd5f0d3a403c5f5ff27106b805bfde7b" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "parking_lot" version = "0.12.1" @@ -2383,21 +2296,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" dependencies = [ "fixed-hash", - "impl-codec", "impl-serde", "uint", ] -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit", -] - [[package]] name = "proc-macro-error" version = "1.0.4" @@ -2520,12 +2422,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - [[package]] name = "rand" version = "0.7.3" @@ -2758,12 +2654,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - [[package]] name = "rustc_version" version = "0.4.0" @@ -3443,12 +3333,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - [[package]] name = "tempfile" version = "3.5.0" @@ -4592,15 +4476,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - [[package]] name = "zeroize" version = "1.6.0" From cff0b61023e566fddf20a1124170e09b741803aa Mon Sep 17 00:00:00 2001 From: Romain Ruetschi Date: Mon, 5 Jun 2023 10:15:25 +0200 Subject: [PATCH 5/5] Remove unused import --- crates/relayer-types/src/timestamp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/relayer-types/src/timestamp.rs b/crates/relayer-types/src/timestamp.rs index 8d0b6c54ab..b9bf462a2a 100644 --- a/crates/relayer-types/src/timestamp.rs +++ b/crates/relayer-types/src/timestamp.rs @@ -1,5 +1,5 @@ use std::fmt::{Display, Error as FmtError, Formatter}; -use std::hash::{Hash, Hasher}; +use std::hash::Hash; use std::num::ParseIntError; use std::ops::{Add, Sub}; use std::str::FromStr;