Update clippy now that redundant imports has been reverted

This commit is contained in:
Luke Parker
2024-04-23 04:31:27 -04:00
parent a25e6330bd
commit a41329c027
20 changed files with 46 additions and 46 deletions

View File

@@ -6,7 +6,7 @@ license = "MIT"
repository = "https://github.com/serai-dex/serai/tree/develop/substrate/abi"
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
edition = "2021"
rust-version = "1.69"
rust-version = "1.74"
[package.metadata.docs.rs]
all-features = true

View File

@@ -1,4 +1,4 @@
use core::str::FromStr;
use core::{str::FromStr, fmt};
use scale::{Encode, Decode};
@@ -35,9 +35,9 @@ impl FromStr for Address {
}
}
impl ToString for Address {
fn to_string(&self) -> String {
self.0.to_string()
impl fmt::Display for Address {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.0.fmt(f)
}
}

View File

@@ -1,4 +1,4 @@
use core::str::FromStr;
use core::{str::FromStr, fmt};
use scale::{Encode, Decode};
@@ -24,9 +24,9 @@ impl FromStr for Address {
}
}
impl ToString for Address {
fn to_string(&self) -> String {
self.0.to_string()
impl fmt::Display for Address {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.0.fmt(f)
}
}

View File

@@ -6,7 +6,7 @@ license = "AGPL-3.0-only"
repository = "https://github.com/serai-dex/serai/tree/develop/substrate/coins/pallet"
authors = ["Akil Demir <aeg_asd@hotmail.com>"]
edition = "2021"
rust-version = "1.70"
rust-version = "1.74"
[package.metadata.docs.rs]
all-features = true

View File

@@ -5,7 +5,7 @@ description = "Serai coins primitives"
license = "MIT"
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
edition = "2021"
rust-version = "1.69"
rust-version = "1.74"
[package.metadata.docs.rs]
all-features = true

View File

@@ -6,7 +6,7 @@ license = "AGPL-3.0-only"
repository = "https://github.com/serai-dex/serai/tree/develop/substrate/dex/pallet"
authors = ["Parity Technologies <admin@parity.io>, Akil Demir <aeg_asd@hotmail.com>"]
edition = "2021"
rust-version = "1.70"
rust-version = "1.74"
[package.metadata.docs.rs]
all-features = true

View File

@@ -43,7 +43,7 @@ fn create_coin<T: Config>(coin: &Coin) -> (T::AccountId, AccountIdLookupOf<T>) {
let caller_lookup = T::Lookup::unlookup(caller);
assert_ok!(Coins::<T>::mint(
caller,
Balance { coin: Coin::native(), amount: Amount(SubstrateAmount::max_value().div(1000u64)) }
Balance { coin: Coin::native(), amount: Amount(SubstrateAmount::MAX.div(1000u64)) }
));
assert_ok!(Coins::<T>::mint(
caller,

View File

@@ -10,7 +10,7 @@ pub use in_instructions_primitives as primitives;
use primitives::*;
// TODO: Investigate why Substrate generates these
#[allow(clippy::cast_possible_truncation, clippy::no_effect_underscore_binding)]
#[allow(clippy::cast_possible_truncation, clippy::no_effect_underscore_binding, clippy::empty_docs)]
#[frame_support::pallet]
pub mod pallet {
use sp_std::vec;

View File

@@ -5,7 +5,7 @@ description = "Serai instructions library, enabling encoding and decoding"
license = "MIT"
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
edition = "2021"
rust-version = "1.69"
rust-version = "1.74"
[package.metadata.docs.rs]
all-features = true

View File

@@ -6,7 +6,7 @@ license = "MIT"
repository = "https://github.com/serai-dex/serai/tree/develop/substrate/primitives"
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
edition = "2021"
rust-version = "1.69"
rust-version = "1.74"
[package.metadata.docs.rs]
all-features = true