Skip to content

Commit cd23ac2

Browse files
author
Samuel Dare
committed
chore: clippy
1 parent 62c1527 commit cd23ac2

File tree

12 files changed

+9
-19
lines changed

12 files changed

+9
-19
lines changed

pallets/collective/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -951,9 +951,9 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
951951
///
952952
/// If not `approved`:
953953
/// - one event deposited.
954-
/// Two removals, one mutation.
955-
/// Computation and i/o `O(P)` where:
956-
/// - `P` is number of active proposals
954+
/// - two removals, one mutation.
955+
/// - computation and i/o `O(P)` where:
956+
/// - `P` is number of active proposals
957957
fn do_approve_proposal(
958958
seats: MemberCount,
959959
yes_votes: MemberCount,

pallets/subtensor/tests/children.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ fn test_do_set_child_singular_multiple_children() {
297297

298298
// SKIP_WASM_BUILD=1 RUST_LOG=info cargo test --test children -- test_add_singular_child --exact --nocapture
299299
#[test]
300-
#[cfg(not(tarpaulin))]
301300
fn test_add_singular_child() {
302301
new_test_ext(1).execute_with(|| {
303302
let netuid: u16 = 1;

pallets/subtensor/tests/coinbase.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use sp_core::U256;
66

77
// Test the ability to hash all sorts of hotkeys.
88
#[test]
9-
#[cfg(not(tarpaulin))]
109
fn test_hotkey_hashing() {
1110
new_test_ext(1).execute_with(|| {
1211
for i in 0..10000 {
@@ -18,7 +17,6 @@ fn test_hotkey_hashing() {
1817
// Test drain tempo on hotkeys.
1918
// SKIP_WASM_BUILD=1 RUST_LOG=debug cargo test --test coinbase test_hotkey_drain_time -- --nocapture
2019
#[test]
21-
#[cfg(not(tarpaulin))]
2220
fn test_hotkey_drain_time() {
2321
new_test_ext(1).execute_with(|| {
2422
// Block 0
@@ -46,7 +44,6 @@ fn test_hotkey_drain_time() {
4644
// To run this test specifically, use the following command:
4745
// SKIP_WASM_BUILD=1 RUST_LOG=debug cargo test --test coinbase test_coinbase_basic -- --nocapture
4846
#[test]
49-
#[cfg(not(tarpaulin))]
5047
fn test_coinbase_basic() {
5148
new_test_ext(1).execute_with(|| {
5249
// Define network ID
@@ -138,7 +135,6 @@ fn test_coinbase_basic() {
138135
// Test getting and setting hotkey emission tempo
139136
// SKIP_WASM_BUILD=1 RUST_LOG=debug cargo test --test coinbase test_set_and_get_hotkey_emission_tempo -- --nocapture
140137
#[test]
141-
#[cfg(not(tarpaulin))]
142138
fn test_set_and_get_hotkey_emission_tempo() {
143139
new_test_ext(1).execute_with(|| {
144140
// Get the default hotkey emission tempo

pallets/subtensor/tests/difficulty.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ mod mock;
55
use sp_core::U256;
66

77
#[test]
8-
#[cfg(not(tarpaulin))]
98
fn test_registration_difficulty_adjustment() {
109
new_test_ext(1).execute_with(|| {
1110
// Create Net 1

pallets/subtensor/tests/epoch.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2107,7 +2107,6 @@ fn test_zero_weights() {
21072107

21082108
// Test that epoch assigns validator permits to highest stake uids, varies uid interleaving and stake values.
21092109
#[test]
2110-
#[cfg(not(tarpaulin))]
21112110
fn test_validator_permits() {
21122111
let netuid: u16 = 1;
21132112
let tempo: u16 = u16::MAX - 1; // high tempo to skip automatic epochs in on_initialize, use manual epochs instead

pallets/subtensor/tests/mock.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ impl CollectiveInterface<AccountId, H256, u32> for TriumvirateVotes {
264264
}
265265

266266
// We call pallet_collective TriumvirateCollective
267+
#[allow(dead_code)]
267268
type TriumvirateCollective = pallet_collective::Instance1;
268269
impl pallet_collective::Config<TriumvirateCollective> for Test {
269270
type RuntimeOrigin = RuntimeOrigin;
@@ -281,6 +282,7 @@ impl pallet_collective::Config<TriumvirateCollective> for Test {
281282
}
282283

283284
// We call council members Triumvirate
285+
#[allow(dead_code)]
284286
type TriumvirateMembership = pallet_membership::Instance1;
285287
impl pallet_membership::Config<TriumvirateMembership> for Test {
286288
type RuntimeEvent = RuntimeEvent;
@@ -297,6 +299,7 @@ impl pallet_membership::Config<TriumvirateMembership> for Test {
297299

298300
// This is a dummy collective instance for managing senate members
299301
// Probably not the best solution, but fastest implementation
302+
#[allow(dead_code)]
300303
type SenateCollective = pallet_collective::Instance2;
301304
impl pallet_collective::Config<SenateCollective> for Test {
302305
type RuntimeOrigin = RuntimeOrigin;
@@ -314,6 +317,7 @@ impl pallet_collective::Config<SenateCollective> for Test {
314317
}
315318

316319
// We call our top K delegates membership Senate
320+
#[allow(dead_code)]
317321
type SenateMembership = pallet_membership::Instance2;
318322
impl pallet_membership::Config<SenateMembership> for Test {
319323
type RuntimeEvent = RuntimeEvent;

pallets/subtensor/tests/neuron_info.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ fn test_get_neuron_none() {
1515
}
1616

1717
#[test]
18-
#[cfg(not(tarpaulin))]
1918
fn test_get_neuron_some() {
2019
new_test_ext(1).execute_with(|| {
2120
let netuid: u16 = 1;

pallets/subtensor/tests/registration.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,6 @@ fn test_burn_adjustment() {
539539
}
540540

541541
#[test]
542-
#[cfg(not(tarpaulin))]
543542
fn test_registration_too_many_registrations_per_block() {
544543
new_test_ext(1).execute_with(|| {
545544
let netuid: u16 = 1;

pallets/subtensor/tests/serving.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ fn test_serving_set_metadata_update() {
161161
}
162162

163163
#[test]
164-
#[cfg(not(tarpaulin))]
165164
fn test_axon_serving_rate_limit_exceeded() {
166165
new_test_ext(1).execute_with(|| {
167166
let hotkey_account_id = U256::from(1);
@@ -379,7 +378,6 @@ fn test_prometheus_serving_set_metadata_update() {
379378
}
380379

381380
#[test]
382-
#[cfg(not(tarpaulin))]
383381
fn test_prometheus_serving_rate_limit_exceeded() {
384382
new_test_ext(1).execute_with(|| {
385383
let hotkey_account_id = U256::from(1);

pallets/subtensor/tests/staking.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use sp_core::{H256, U256};
1515
************************************************************/
1616

1717
#[test]
18-
#[cfg(not(tarpaulin))]
1918
fn test_add_stake_dispatch_info_ok() {
2019
new_test_ext(1).execute_with(|| {
2120
let hotkey = U256::from(0);
@@ -521,7 +520,6 @@ fn test_remove_stake_rate_limit_exceeded() {
521520
}
522521

523522
#[test]
524-
#[cfg(not(tarpaulin))]
525523
fn test_remove_stake_dispatch_info_ok() {
526524
new_test_ext(1).execute_with(|| {
527525
let hotkey = U256::from(0);

0 commit comments

Comments
 (0)