From c17edf99ab6b44ec7d9a487296b1c1885404e437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Andr=C3=A9s=20Dorado=20Su=C3=A1rez?= Date: Tue, 25 Jun 2024 15:49:45 -0500 Subject: [PATCH] fix: lint --- pallets/communities/src/tests/governance.rs | 21 ----------------- pallets/communities/src/types.rs | 2 -- runtime/kreivo/build.rs | 26 --------------------- runtime/kreivo/src/lib.rs | 1 + 4 files changed, 1 insertion(+), 49 deletions(-) diff --git a/pallets/communities/src/tests/governance.rs b/pallets/communities/src/tests/governance.rs index 5cb6e739..c31b7654 100644 --- a/pallets/communities/src/tests/governance.rs +++ b/pallets/communities/src/tests/governance.rs @@ -776,27 +776,6 @@ mod vote { }); } - // Note: cannot test this unless another pallet exposes `FreezeReason`s - // use frame_support::traits::fungible::MutateFreeze; - // #[test] - // fn locks_can_overlap() { - // new_test_ext().execute_with(|| { - // // Suppose CHARLIE has already casted a vote on other poll (let's call it 4) - // assert_ok!(Balances::set_freeze( - // &pallet_preimage::HoldReason::Preimage.into(), - // &CHARLIE, - // 12 - // )); - - // assert_ok!(Communities::vote( - // RuntimeOrigin::signed(CHARLIE), - // membership(COMMUNITY_C, 3), - // 2, - // Vote::NativeBalance(true, 11) - // )); - // }); - // } - #[test] fn rejects_on_most_nays() { new_test_ext().execute_with(|| { diff --git a/pallets/communities/src/types.rs b/pallets/communities/src/types.rs index da43ba66..c44df27b 100644 --- a/pallets/communities/src/types.rs +++ b/pallets/communities/src/types.rs @@ -66,7 +66,6 @@ pub enum DecisionMethod { // Governance pub type VoteWeight = u32; -/// #[derive(Clone, Debug, Decode, Encode, PartialEq, MaxEncodedLen, TypeInfo)] #[scale_info(skip_type_params(AssetId, AssetBalance, NativeBalance))] pub enum Vote { @@ -107,7 +106,6 @@ where } } -/// #[derive(Clone, Debug, Decode, Encode, Eq, MaxEncodedLen, PartialEq, TypeInfo)] #[scale_info(skip_type_params(T))] #[codec(mel_bound(T: Config))] diff --git a/runtime/kreivo/build.rs b/runtime/kreivo/build.rs index 9c3b8e3e..9b53d245 100644 --- a/runtime/kreivo/build.rs +++ b/runtime/kreivo/build.rs @@ -1,21 +1,5 @@ use substrate_wasm_builder::WasmBuilder; -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#[cfg(all(feature = "std", not(feature = "metadata-hash")))] fn main() { WasmBuilder::new() .with_current_project() @@ -23,13 +7,3 @@ fn main() { .import_memory() .build() } - -#[cfg(all(feature = "std", feature = "metadata-hash"))] -fn main() { - WasmBuilder::init_with_defaults() - .enable_metadata_hash("KSM", 12) - .build() -} - -#[cfg(not(feature = "std"))] -fn main() {} diff --git a/runtime/kreivo/src/lib.rs b/runtime/kreivo/src/lib.rs index 2bef07b5..08f49e49 100644 --- a/runtime/kreivo/src/lib.rs +++ b/runtime/kreivo/src/lib.rs @@ -766,6 +766,7 @@ mod benches { ); } +#[allow(dead_code)] struct CheckInherents; impl cumulus_pallet_parachain_system::CheckInherents for CheckInherents { fn check_inherents(