Browse Source

Remove obsolete mock runtime trait

iorveth 4 years ago
parent
commit
2832c4a387

+ 0 - 10
runtime-modules/council/src/mock.rs

@@ -445,16 +445,6 @@ impl membership::Trait for Runtime {
     type InvitedMemberStakingHandler = staking_handler::StakingManager<Self, InvitedMemberLockId>;
 }
 
-impl common::working_group::MembershipWorkingGroupHelper<Runtime> for () {
-    fn insert_a_lead(
-        _opening_id: u32,
-        _caller_id: &<Runtime as frame_system::Trait>::AccountId,
-        _member_id: <Runtime as common::Trait>::MemberId,
-    ) -> <Runtime as common::Trait>::ActorId {
-        unimplemented!()
-    }
-}
-
 impl common::working_group::WorkingGroupBudgetHandler<Runtime> for () {
     fn get_budget() -> u64 {
         unimplemented!()

+ 0 - 10
runtime-modules/forum/src/mock.rs

@@ -401,16 +401,6 @@ impl common::working_group::WorkingGroupAuthenticator<Runtime> for () {
     }
 }
 
-impl common::working_group::MembershipWorkingGroupHelper<Runtime> for () {
-    fn insert_a_lead(
-        _opening_id: u32,
-        _caller_id: &<Runtime as frame_system::Trait>::AccountId,
-        _member_id: <Runtime as common::Trait>::MemberId,
-    ) -> <Runtime as common::Trait>::ActorId {
-        unimplemented!()
-    }
-}
-
 impl WeightInfo for () {
     fn create_category(_: u32, _: u32, _: u32) -> Weight {
         0

+ 8 - 1
runtime-modules/membership/src/tests/mock.rs

@@ -363,7 +363,14 @@ impl common::working_group::WorkingGroupAuthenticator<Test> for () {
     }
 }
 
-impl common::working_group::MembershipWorkingGroupHelper<Test> for () {
+#[cfg(feature = "runtime-benchmarks")]
+impl
+    crate::MembershipWorkingGroupHelper<
+        <Test as frame_system::Trait>::AccountId,
+        <Test as common::Trait>::MemberId,
+        <Test as common::Trait>::ActorId,
+    > for Test
+{
     fn insert_a_lead(
         _opening_id: u32,
         _caller_id: &<Test as frame_system::Trait>::AccountId,

+ 0 - 10
runtime-modules/proposals/codex/src/tests/mock.rs

@@ -119,16 +119,6 @@ impl membership::Trait for Test {
     type InvitedMemberStakingHandler = staking_handler::StakingManager<Self, InvitedMemberLockId>;
 }
 
-impl common::working_group::MembershipWorkingGroupHelper<Test> for () {
-    fn insert_a_lead(
-        _opening_id: u32,
-        _caller_id: &<Test as frame_system::Trait>::AccountId,
-        _member_id: <Test as common::Trait>::MemberId,
-    ) -> <Test as common::Trait>::ActorId {
-        unimplemented!()
-    }
-}
-
 impl common::working_group::WorkingGroupBudgetHandler<Test> for () {
     fn get_budget() -> u64 {
         unimplemented!()

+ 0 - 10
runtime-modules/proposals/discussion/src/tests/mock.rs

@@ -167,16 +167,6 @@ impl common::working_group::WorkingGroupBudgetHandler<Test> for () {
     }
 }
 
-impl common::working_group::MembershipWorkingGroupHelper<Test> for () {
-    fn insert_a_lead(
-        _opening_id: u32,
-        _caller_id: &<Test as frame_system::Trait>::AccountId,
-        _member_id: <Test as common::Trait>::MemberId,
-    ) -> <Test as common::Trait>::ActorId {
-        unimplemented!()
-    }
-}
-
 impl common::working_group::WorkingGroupAuthenticator<Test> for () {
     fn ensure_worker_origin(
         _origin: <Test as frame_system::Trait>::Origin,

+ 0 - 10
runtime-modules/proposals/engine/src/tests/mock/mod.rs

@@ -188,16 +188,6 @@ impl common::Trait for Test {
     type ActorId = u64;
 }
 
-impl common::working_group::MembershipWorkingGroupHelper<Test> for () {
-    fn insert_a_lead(
-        _opening_id: u32,
-        _caller_id: &<Test as frame_system::Trait>::AccountId,
-        _member_id: <Test as common::Trait>::MemberId,
-    ) -> <Test as common::Trait>::ActorId {
-        unimplemented!()
-    }
-}
-
 // Weights info stub
 pub struct Weights;
 impl membership::WeightInfo for Weights {

+ 0 - 10
runtime-modules/referendum/src/mock.rs

@@ -252,16 +252,6 @@ impl pallet_timestamp::Trait for Runtime {
     type WeightInfo = ();
 }
 
-impl common::working_group::MembershipWorkingGroupHelper<Runtime> for () {
-    fn insert_a_lead(
-        _opening_id: u32,
-        _caller_id: &<Runtime as frame_system::Trait>::AccountId,
-        _member_id: <Runtime as common::Trait>::MemberId,
-    ) -> <Runtime as common::Trait>::ActorId {
-        unimplemented!()
-    }
-}
-
 impl common::working_group::WorkingGroupBudgetHandler<Runtime> for () {
     fn get_budget() -> u64 {
         unimplemented!()

+ 0 - 10
runtime-modules/service-discovery/src/mock.rs

@@ -161,16 +161,6 @@ impl membership::Trait for Test {
     type InvitedMemberStakingHandler = staking_handler::StakingManager<Self, InvitedMemberLockId>;
 }
 
-impl common::working_group::MembershipWorkingGroupHelper<Test> for () {
-    fn insert_a_lead(
-        _opening_id: u32,
-        _caller_id: &<Test as frame_system::Trait>::AccountId,
-        _member_id: <Test as common::Trait>::MemberId,
-    ) -> <Test as common::Trait>::ActorId {
-        unimplemented!()
-    }
-}
-
 impl common::working_group::WorkingGroupBudgetHandler<Test> for () {
     fn get_budget() -> u64 {
         unimplemented!()

+ 0 - 10
runtime-modules/storage/src/tests/mock.rs

@@ -368,16 +368,6 @@ impl common::working_group::WorkingGroupBudgetHandler<Test> for () {
     }
 }
 
-impl common::working_group::MembershipWorkingGroupHelper<Test> for () {
-    fn insert_a_lead(
-        _opening_id: u32,
-        _caller_id: &<Test as frame_system::Trait>::AccountId,
-        _member_id: <Test as common::Trait>::MemberId,
-    ) -> <Test as common::Trait>::ActorId {
-        unimplemented!()
-    }
-}
-
 impl common::working_group::WorkingGroupAuthenticator<Test> for () {
     fn ensure_worker_origin(
         _origin: <Test as frame_system::Trait>::Origin,

+ 0 - 13
runtime-modules/working-group/src/lib.rs

@@ -1401,16 +1401,3 @@ impl<T: Trait<I>, I: Instance> common::working_group::WorkingGroupBudgetHandler<
         Self::set_working_group_budget(new_value);
     }
 }
-
-#[cfg(not(feature = "runtime-benchmarks"))]
-impl<T: Trait<I>, I: Instance> common::working_group::MembershipWorkingGroupHelper<T>
-    for Module<T, I>
-{
-    fn insert_a_lead(
-        _opening_id: u32,
-        _caller_id: &T::AccountId,
-        _member_id: T::MemberId,
-    ) -> T::ActorId {
-        unimplemented!()
-    }
-}