Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
runcomet committed Nov 23, 2024
1 parent 8c9c6cf commit f100e33
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 53 deletions.
17 changes: 8 additions & 9 deletions substrate/frame/alliance/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@

#![cfg(feature = "runtime-benchmarks")]

use core::{cmp, mem::size_of};
/*
use sp_runtime::traits::{Bounded, Hash, StaticLookup};
use frame_benchmarking::{account, v2::*, BenchmarkError};
use frame_support::traits::{EnsureOrigin, Get, UnfilteredDispatchable};
use frame_system::{pallet_prelude::BlockNumberFor, Pallet as System, RawOrigin as SystemOrigin};
*/
use super::{Call as AllianceCall, Pallet as Alliance, *};
use frame::{benchmarking::prelude::*, deps::{frame_system::{Pallet as System, RawOrigin as SystemOrigin}, frame_support::traits::{EnsureOrigin, Get, UnfilteredDispatchable}}};
use core::{cmp, mem::size_of};
use frame::{
benchmarking::prelude::*,
deps::{
frame_support::traits::{EnsureOrigin, Get, UnfilteredDispatchable},
frame_system::{Pallet as System, RawOrigin as SystemOrigin},
},
};

const SEED: u32 = 0;

Expand Down
18 changes: 0 additions & 18 deletions substrate/frame/alliance/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,24 +106,6 @@ use frame::{
Saturating, StaticLookup, Zero,
},
};
/*
use frame_support::pallet_prelude::*;
use frame_system::pallet_prelude::*;
use sp_runtime::{
traits::{Dispatchable, Saturating, StaticLookup, Zero},
DispatchError, RuntimeDebug,
};
use frame_support::{
dispatch::{DispatchResult, DispatchResultWithPostInfo, GetDispatchInfo, PostDispatchInfo},
ensure,
traits::{
ChangeMembers, Currency, Get, InitializeMembers, IsSubType, OnUnbalanced,
ReservableCurrency,
},
weights::Weight,
};
*/
use scale_info::TypeInfo;

pub use pallet::*;
Expand Down
3 changes: 1 addition & 2 deletions substrate/frame/alliance/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
// limitations under the License.

use crate::{Config, Pallet, Weight, LOG_TARGET};
//use frame_support::{pallet_prelude::*, storage::migration, traits::OnRuntimeUpgrade};
use frame::{deps::frame_support::storage::migration, prelude::*, traits::OnRuntimeUpgrade};
use log;

Expand Down Expand Up @@ -163,9 +162,9 @@ pub(crate) mod v1_to_v2 {
#[cfg(test)]
mod test {
use super::*;
use crate::{mock::*, MemberRole, Members};
use frame::testing_prelude::assert_ok;
use pretty_assertions::assert_eq;
use crate::{mock::*, MemberRole, Members};

#[test]
fn migration_v1_to_v2_works() {
Expand Down
14 changes: 0 additions & 14 deletions substrate/frame/alliance/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,6 @@
// limitations under the License.

//! Test utilities
/*
pub use sp_core::H256;
use sp_runtime::traits::Hash;
pub use sp_runtime::{
traits::{BlakeTwo256, IdentifyAccount, Lazy, Verify},
BuildStorage,
};
pub use frame_support::{
assert_noop, assert_ok, derive_impl, ord_parameter_types, parameter_types,
traits::EitherOfDiverse, BoundedVec,
};
use frame_system::{EnsureRoot, EnsureSignedBy};
*/
use frame::{
deps::{
frame_support::{traits::EitherOfDiverse, BoundedVec},
Expand Down
13 changes: 7 additions & 6 deletions substrate/frame/alliance/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@

//! Tests for the alliance pallet.

/*
use frame_support::{assert_noop, assert_ok};
use frame_system::{EventRecord, Phase};
use sp_runtime::traits::BadOrigin;
*/
use super::*;
use crate::{self as alliance, mock::*};
use frame::{testing_prelude::{assert_noop, assert_ok}, deps::{sp_runtime::DispatchError::BadOrigin, frame_system::{EventRecord, Phase}}};
use frame::{
deps::{
frame_system::{EventRecord, Phase},
sp_runtime::DispatchError::BadOrigin,
},
testing_prelude::{assert_noop, assert_ok},
};

type AllianceMotionEvent = pallet_collective::Event<Test, pallet_collective::Instance1>;

Expand Down
4 changes: 1 addition & 3 deletions substrate/frame/alliance/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@

use alloc::vec::Vec;
use codec::{Decode, Encode, MaxEncodedLen};
// use frame_support::{traits::ConstU32, BoundedVec};
use scale_info::TypeInfo;
// use sp_runtime::RuntimeDebug;
use frame::{deps::frame_support::BoundedVec, derive::RuntimeDebug, runtime::prelude::ConstU32};
use scale_info::TypeInfo;

/// A Multihash instance that only supports the basic functionality and no hashing.
#[derive(
Expand Down
1 change: 0 additions & 1 deletion substrate/frame/alliance/src/weights.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f100e33

Please sign in to comment.