diff --git a/pallets/bidding/src/lib.rs b/pallets/bidding/src/lib.rs index e0a1f334..85ade8d8 100644 --- a/pallets/bidding/src/lib.rs +++ b/pallets/bidding/src/lib.rs @@ -152,7 +152,7 @@ use frame_support::pallet_prelude::*; impl Pallet { fn begin_block(now: T::BlockNumber) -> Weight { let max_block_weight: u64 = 1000; - + #[allow(unused)] if (now % T::NewAssetScanPeriod::get()).is_zero() { Self::process_onboarded_assets(); Self::process_finalised_assets(); @@ -392,7 +392,7 @@ impl Pallet { // The definitive shares will be determined by this loop // Each round, 100% is decremented by the share of the contribution processed for item in eligible_contributions.iter() { - let mut item_share = Self::u64_to_balance_option(0).unwrap(); + let item_share; // We are checking the last item so it takes the remaining percentage if count == contributions_length { diff --git a/pallets/bidding/src/tests.rs b/pallets/bidding/src/tests.rs index 76750c45..79bcf2ed 100644 --- a/pallets/bidding/src/tests.rs +++ b/pallets/bidding/src/tests.rs @@ -264,6 +264,7 @@ fn create_investor_list_second_case_should_succeed() { } #[test] +#[allow(unused_assignments)] fn create_investor_list_third_case_should_succeed() { new_test_ext().execute_with(|| { let mut block_number = System::block_number(); @@ -303,6 +304,7 @@ fn create_investor_list_third_case_should_succeed() { } #[test] +#[allow(unused_assignments)] fn create_investor_list_fourth_case_should_succeed() { new_test_ext().execute_with(|| { let mut block_number = System::block_number(); diff --git a/pallets/housing_fund/src/mock.rs b/pallets/housing_fund/src/mock.rs index e4f69c5d..a7014bc8 100644 --- a/pallets/housing_fund/src/mock.rs +++ b/pallets/housing_fund/src/mock.rs @@ -19,7 +19,6 @@ pub(crate) type Balance = u128; type AccountId = u64; pub type CollectionId = u32; pub type ItemId = u32; -pub type NftCollection = crate::NFT::PossibleCollections; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( diff --git a/pallets/onboarding/src/tests.rs b/pallets/onboarding/src/tests.rs index 9113dfd3..997fcbb7 100644 --- a/pallets/onboarding/src/tests.rs +++ b/pallets/onboarding/src/tests.rs @@ -136,7 +136,7 @@ fn create_proposal_2() { let status_bis: AssetStatus = Houses::::get(coll_id, item_id).unwrap().status; assert_ne!(status.clone(), status_bis.clone()); - println!("status1:{:?}\nstatus2:{:?}", status, status_bis); + println!("status1:{status:?}\nstatus2:{status_bis:?}"); expect_events(vec![ crate::Event::ProposalCreated { diff --git a/pallets/roles/src/lib.rs b/pallets/roles/src/lib.rs index 38de7936..f129601a 100644 --- a/pallets/roles/src/lib.rs +++ b/pallets/roles/src/lib.rs @@ -60,7 +60,7 @@ mod types; pub mod weights; pub use crate::types::*; pub use pallet_sudo as SUDO; -use sp_std::{fmt::Debug, prelude::*}; +use sp_std::{prelude::*}; pub use weights::WeightInfo; #[frame_support::pallet] pub mod pallet { diff --git a/pallets/share_distributor/src/functions.rs b/pallets/share_distributor/src/functions.rs index 53ddce41..60c2941c 100644 --- a/pallets/share_distributor/src/functions.rs +++ b/pallets/share_distributor/src/functions.rs @@ -4,6 +4,7 @@ //4) transfer tokens to owners use super::*; use enum_iterator::all; +#[allow(unused_imports)] use num_traits::float::FloatCore; use sp_runtime::{traits::SaturatedConversion, FixedPointNumber, FixedU128}; @@ -14,7 +15,7 @@ impl Pallet { item_id: T::NftItemId, ) -> DispatchResult { //Create virtual account - let text0 = format!("{:?}_{:?}_account", collection_id, item_id.clone()); + let text0 = format!("{collection_id:?}_{:?}_account", item_id.clone()); let bytes = text0.as_bytes(); let array: &[u8; 8] = &bytes[0..8].try_into().unwrap(); let account: T::AccountId = PalletId(*array).into_account_truncating(); diff --git a/pallets/share_distributor/src/tests.rs b/pallets/share_distributor/src/tests.rs index 92325149..abb7ad7e 100644 --- a/pallets/share_distributor/src/tests.rs +++ b/pallets/share_distributor/src/tests.rs @@ -133,7 +133,7 @@ fn share_distributor0() { let balance1 = Assets::Pallet::::balance(id, EVE); let _infos = ShareDistributor::tokens_infos(new_owner0.clone()).unwrap().owners; - println!("Tokens own by DAVE:{:?}\nTokens own by Eve:{:?}", balance0, balance1); + println!("Tokens own by DAVE:{balance0:?}\nTokens own by Eve:{balance1:?}"); println!("Total supply {:?}", Assets::Pallet::::total_supply(id)); // Bob creates a second proposal without submiting for review @@ -169,7 +169,7 @@ fn share_distributor0() { let virtual1 = Virtual::::get(coll_id1, item_id1).unwrap(); //Check that virtual accounts are different - println!("Virtual account nbr1:{:?}\nVirtual account nbr2:{:?}", virtual0, virtual1); + println!("Virtual account nbr1:{virtual0:?}\nVirtual account nbr2:{virtual1:?}"); assert_ne!(virtual0.virtual_account, virtual1.virtual_account); //Check that virtual accounts are the new owners assert_eq!(new_owner0, virtual0.virtual_account); @@ -274,7 +274,7 @@ fn share_distributor1() { ); let infos = ShareDistributor::tokens_infos(new_owner0.clone()).unwrap().owners; - println!("Again, new owners are:\n{:?}", infos); + println!("Again, new owners are:\n{infos:?}"); assert_eq!(owners.len() > 1, true); expect_events(vec![ diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 4a37933e..4b33a49c 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -980,10 +980,9 @@ impl Contains for DontAllowCollectiveAndDemocracy { } } } - parameter_types! { - pub const Delay: BlockNumber = 0 * MINUTES;//3 * MINUTES; - pub const CheckDelay: BlockNumber = MINUTES;//3 * MINUTES; + pub const Delay: BlockNumber = MINUTES;// No-delay; + pub const CheckDelay: BlockNumber = MINUTES;//No-delay; pub const InvestorVoteAmount: u128 = 10 * DOLLARS; pub const CheckPeriod: BlockNumber = MINUTES; }