diff --git a/Cargo.toml b/Cargo.toml index 316d45e8b..e5052b3db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -314,6 +314,7 @@ unexpected_cfgs = { level = "allow", check-cfg = [ assertions_on_result_states = "warn" allow_attributes = "warn" mod_module_files = "deny" +wildcard_imports = "deny" [workspace.lints.rustdoc] broken_intra_doc_links = "deny" diff --git a/crates/contract/src/crypto_shared/types.rs b/crates/contract/src/crypto_shared/types.rs index b31bd8658..384a1721c 100644 --- a/crates/contract/src/crypto_shared/types.rs +++ b/crates/contract/src/crypto_shared/types.rs @@ -159,7 +159,10 @@ impl TryFrom for PublicKeyExtended { } pub mod k256_types { - use super::*; + use super::{ + AffinePoint, BorshDeserialize, BorshSerialize, CurveArithmetic, Deserialize, PrimeField, + Secp256k1, Serialize, + }; use k256::Scalar; pub type PublicKey = ::AffinePoint; @@ -249,7 +252,7 @@ pub mod k256_types { } pub mod ed25519_types { - use super::*; + use super::{BorshDeserialize, BorshSerialize, Deserialize, PrimeField, Serialize, serde_as}; use curve25519_dalek::Scalar; // Is there a better way to force a borsh serialization? diff --git a/crates/contract/src/dto_mapping.rs b/crates/contract/src/dto_mapping.rs index f651cd81e..9caf2bfc2 100644 --- a/crates/contract/src/dto_mapping.rs +++ b/crates/contract/src/dto_mapping.rs @@ -606,7 +606,10 @@ impl TryFrom for Config { // Gated behind `test-utils` so they stay out of the production/WASM surface. #[cfg(feature = "test-utils")] mod test_conversions { - use super::*; + use super::{ + GovernanceThresholdParameters, IntoContractType, IntoInterfaceType, ParticipantInfo, + ProposedGovernanceThresholdParameters, ProtocolContractState, dtos, + }; impl From for dtos::ProtocolContractState { fn from(state: ProtocolContractState) -> Self { diff --git a/crates/devnet/src/types.rs b/crates/devnet/src/types.rs index 086574d7a..c1ee6ae5d 100644 --- a/crates/devnet/src/types.rs +++ b/crates/devnet/src/types.rs @@ -219,7 +219,9 @@ pub mod near_crypto_compatible_serialization { const ED25519_PREFIX: &str = "ed25519"; pub mod signing_keys { - use super::*; + use super::{ + Deserialize, Deserializer, ED25519_PREFIX, Serialize, Serializer, SigningKey, de, + }; pub fn serialize(keys: &[SigningKey], serializer: S) -> Result where @@ -264,7 +266,9 @@ pub mod near_crypto_compatible_serialization { pub mod verifying_key { use anyhow::Context; - use super::*; + use super::{ + Deserialize, Deserializer, ED25519_PREFIX, Serialize, Serializer, VerifyingKey, de, + }; pub fn serialize(key: &VerifyingKey, serializer: S) -> Result where diff --git a/crates/near-mpc-bounded-collections/src/bounded_vec.rs b/crates/near-mpc-bounded-collections/src/bounded_vec.rs index 03b42cf26..0925653e0 100644 --- a/crates/near-mpc-bounded-collections/src/bounded_vec.rs +++ b/crates/near-mpc-bounded-collections/src/bounded_vec.rs @@ -599,7 +599,7 @@ impl OptBoundedVecToVec } mod borsh_impl { - use super::*; + use super::{BoundedVec, witnesses}; use borsh::{BorshDeserialize, BorshSerialize}; impl BorshSerialize @@ -632,7 +632,7 @@ mod borsh_impl { #[cfg(feature = "abi")] mod schema { - use super::*; + use super::BoundedVec; use borsh::BorshSchema; use borsh::schema::{Declaration, Definition, add_definition}; use std::collections::BTreeMap; @@ -656,7 +656,7 @@ mod borsh_impl { } mod serde_impl { - use super::*; + use super::{BoundedVec, TryFrom, UpperBoundedVec}; use serde::{Deserialize, Serialize}; // direct impl to unify serde in one place instead of doing attribute on declaration and deserialize here @@ -693,7 +693,7 @@ mod serde_impl { #[cfg(all(feature = "abi", not(target_arch = "wasm32")))] mod schema { - use super::*; + use super::{BoundedVec, TryFrom}; use schemars::JsonSchema; impl JsonSchema for BoundedVec { @@ -739,7 +739,7 @@ mod serde_impl { /// } /// ``` pub mod hex_serde { - use super::*; + use super::{BoundedVec, BoundedVecOutOfBounds, TryFrom, TryInto}; use serde::Deserialize; #[cfg(all(feature = "abi", not(target_arch = "wasm32")))]