Skip to content

Commit

Permalink
refactor: remove new nightly lints for check-substrate workflow job (
Browse files Browse the repository at this point in the history
…#1096)

* rm new lints

* conditional ibc_primitives import

* cargo fmt
  • Loading branch information
rnbguy authored Feb 20, 2024
1 parent 4b6f7ac commit e78c372
Show file tree
Hide file tree
Showing 26 changed files with 3 additions and 44 deletions.
3 changes: 0 additions & 3 deletions ibc-apps/ics20-transfer/src/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,6 @@ pub fn on_timeout_packet_execute(

#[cfg(test)]
mod test {
use ibc_app_transfer_types::ack_success_b64;
use ibc_app_transfer_types::error::TokenTransferError;

use super::*;

#[test]
Expand Down
1 change: 0 additions & 1 deletion ibc-apps/ics20-transfer/types/src/packet.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Contains the `PacketData` type that defines the structure of token transfers' packet bytes
use core::convert::TryFrom;
use core::str::FromStr;

use ibc_core::primitives::prelude::*;
Expand Down
2 changes: 0 additions & 2 deletions ibc-apps/ics721-nft-transfer/src/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,6 @@ pub fn on_timeout_packet_execute(
#[cfg(test)]
mod test {
use super::*;
use crate::types::ack_success_b64;
use crate::types::error::NftTransferError;

#[test]
fn test_ack_ser() {
Expand Down
2 changes: 0 additions & 2 deletions ibc-apps/ics721-nft-transfer/types/src/packet.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//! Contains the `PacketData` type that defines the structure of NFT transfers' packet bytes
use core::convert::TryFrom;

use base64::prelude::BASE64_STANDARD;
use base64::Engine;
use ibc_core::primitives::prelude::*;
Expand Down
1 change: 0 additions & 1 deletion ibc-clients/ics07-tendermint/src/client_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,6 @@ mod tests {
use ibc_client_tendermint_types::{
AllowUpdate, ClientState as ClientStateType, TrustThreshold,
};
use ibc_core_client::types::Height;
use ibc_core_commitment_types::specs::ProofSpecs;
use ibc_core_host::types::identifiers::ChainId;

Expand Down
2 changes: 0 additions & 2 deletions ibc-clients/ics07-tendermint/src/context.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use alloc::string::ToString;

use ibc_core_client::context::ClientExecutionContext;
use ibc_core_client::types::Height;
use ibc_core_handler_types::error::ContextError;
Expand Down
2 changes: 0 additions & 2 deletions ibc-clients/ics07-tendermint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
rust_2018_idioms
)]

extern crate alloc;

#[cfg(any(test, feature = "std"))]
extern crate std;

Expand Down
3 changes: 0 additions & 3 deletions ibc-clients/ics07-tendermint/types/src/client_state.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Contains the implementation of the Tendermint `ClientState` domain type.
use core::cmp::max;
use core::convert::{TryFrom, TryInto};
use core::str::FromStr;
use core::time::Duration;

Expand Down Expand Up @@ -422,8 +421,6 @@ pub(crate) mod serde_tests {

#[cfg(test)]
mod tests {
use core::time::Duration;

use ibc_core_commitment_types::proto::ics23::ProofSpec as Ics23ProofSpec;

use super::*;
Expand Down
1 change: 0 additions & 1 deletion ibc-clients/ics07-tendermint/types/src/header.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Defines the domain type for tendermint headers
use alloc::string::ToString;
use core::fmt::{Display, Error as FmtError, Formatter};
use core::str::FromStr;

Expand Down
2 changes: 0 additions & 2 deletions ibc-clients/ics07-tendermint/types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ use core::str::FromStr;

use ibc_core_host_types::identifiers::ClientType;

extern crate alloc;

#[cfg(any(test, feature = "std"))]
extern crate std;

Expand Down
1 change: 0 additions & 1 deletion ibc-clients/ics07-tendermint/types/src/trust_threshold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//! 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 ibc_core_client_types::error::ClientError;
Expand Down
2 changes: 2 additions & 0 deletions ibc-clients/ics08-wasm/types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ pub mod serializer;
use core::str::FromStr;

use ibc_core_host_types::identifiers::ClientType;
#[cfg(not(feature = "std"))]
use ibc_primitives::prelude::Vec;

pub type Bytes = Vec<u8>;

/// Re-exports ICS-08 Wasm light client proto types from `ibc-proto` crate.
Expand Down
2 changes: 0 additions & 2 deletions ibc-core/ics02-client/context/src/client_state.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//! Defines `ClientState`, the core type to be implemented by light clients
use core::marker::{Send, Sync};

use ibc_core_client_types::error::ClientError;
use ibc_core_client_types::{Height, Status};
use ibc_core_commitment_types::commitment::{
Expand Down
2 changes: 0 additions & 2 deletions ibc-core/ics02-client/context/src/consensus_state.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//! Defines the trait to be implemented by all concrete consensus state types
use core::marker::{Send, Sync};

use ibc_core_commitment_types::commitment::CommitmentRoot;
use ibc_primitives::prelude::*;
use ibc_primitives::Timestamp;
Expand Down
1 change: 0 additions & 1 deletion ibc-core/ics03-connection/types/src/msgs/conn_open_try.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use core::convert::{TryFrom, TryInto};
use core::time::Duration;

use ibc_core_client_types::Height;
Expand Down
1 change: 0 additions & 1 deletion ibc-core/ics23-commitment/types/src/commitment.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Defines core commitment types
use core::convert::TryFrom;
use core::fmt;

use ibc_primitives::prelude::*;
Expand Down
2 changes: 0 additions & 2 deletions ibc-core/ics24-host/types/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1168,8 +1168,6 @@ fn parse_upgrades(components: &[&str]) -> Option<Path> {

#[cfg(test)]
mod tests {
use core::str::FromStr;

use super::*;

#[rstest::rstest]
Expand Down
2 changes: 0 additions & 2 deletions ibc-core/ics25-handler/types/src/events.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//! Defines events emitted during handling of IBC messages
use core::convert::{TryFrom, TryInto};

use displaydoc::Display;
use ibc_core_channel_types::{error as channel_error, events as ChannelEvents};
use ibc_core_client_types::error as client_error;
Expand Down
1 change: 0 additions & 1 deletion ibc-primitives/src/utils/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ impl<'a, T: Display> Display for PrettySlice<'a, T> {
#[cfg(test)]
mod tests {
use super::*;
use crate::alloc::string::ToString;
use crate::prelude::*;

#[test]
Expand Down
2 changes: 0 additions & 2 deletions ibc-query/src/core/channel/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
//! `I` must be a type where writes from one thread are readable from another.
//! This means using `Arc<Mutex<_>>` or `Arc<RwLock<_>>` in most cases.
use alloc::boxed::Box;

use ibc::core::host::ValidationContext;
use ibc::core::primitives::prelude::*;
use ibc_proto::google::protobuf::Any;
Expand Down
2 changes: 0 additions & 2 deletions ibc-query/src/core/client/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
//! `I` must be a type where writes from one thread are readable from another.
//! This means using `Arc<Mutex<_>>` or `Arc<RwLock<_>>` in most cases.
use alloc::boxed::Box;

use ibc::core::host::ValidationContext;
use ibc::core::primitives::prelude::*;
use ibc::cosmos_host::upgrade_proposal::UpgradeValidationContext;
Expand Down
2 changes: 0 additions & 2 deletions ibc-query/src/core/connection/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
//! `I` must be a type where writes from one thread are readable from another.
//! This means using `Arc<Mutex<_>>` or `Arc<RwLock<_>>` in most cases.
use alloc::boxed::Box;

use ibc::core::host::ValidationContext;
use ibc::core::primitives::prelude::*;
use ibc_proto::google::protobuf::Any;
Expand Down
1 change: 0 additions & 1 deletion ibc-testkit/src/fixtures/core/channel/packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ pub fn dummy_proof() -> Vec<u8> {
mod tests {
use ibc::core::channel::types::channel::Order;
use ibc::core::channel::types::events::SendPacket;
use ibc::core::channel::types::packet::Packet;
use ibc::core::handler::types::events::IbcEvent;
use ibc::core::host::types::identifiers::ConnectionId;

Expand Down
3 changes: 0 additions & 3 deletions ibc-testkit/src/fixtures/core/client/msg_upgrade_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ pub fn dummy_raw_msg_upgrade_client() -> RawMsgUpgradeClient {

#[cfg(test)]
mod tests {

use ibc::core::client::types::msgs::MsgUpgradeClient;

use super::*;

#[test]
Expand Down
1 change: 0 additions & 1 deletion ibc-testkit/src/testapp/ibc/core/router/types.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use alloc::collections::BTreeMap;
use alloc::sync::Arc;

use ibc::apps::transfer::types::MODULE_ID_STR;
Expand Down
3 changes: 1 addition & 2 deletions ibc-testkit/src/testapp/ibc/core/types.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Implementation of a global context mock. Used in testing handlers of all IBC modules.
use alloc::collections::btree_map::BTreeMap;
use alloc::sync::Arc;
use core::cmp::min;
use core::fmt::Debug;
Expand Down Expand Up @@ -1153,7 +1152,7 @@ mod tests {
(module_id, result)
};

let _results = vec![
let _results = [
on_recv_packet_result("foomodule"),
on_recv_packet_result("barmodule"),
];
Expand Down

0 comments on commit e78c372

Please sign in to comment.