Skip to content

Commit 09d384d

Browse files
committed
Resolve all clippy errors in tests
1 parent 9ca480b commit 09d384d

File tree

11 files changed

+26
-1
lines changed

11 files changed

+26
-1
lines changed

pallets/subtensor/tests/block_step.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
#![allow(clippy::unwrap_used)]
2+
13
mod mock;
24
use frame_support::assert_ok;
35
use frame_system::Config;
46
use mock::*;
57
use sp_core::U256;
68

79
#[test]
8-
#[allow(clippy::unwrap_used)]
910
fn test_loaded_emission() {
1011
new_test_ext(1).execute_with(|| {
1112
let n: u16 = 100;

pallets/subtensor/tests/difficulty.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(clippy::unwrap_used)]
2+
13
use crate::mock::*;
24
mod mock;
35
use sp_core::U256;

pallets/subtensor/tests/epoch.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#![allow(
2+
clippy::arithmetic_side_effects,
3+
clippy::indexing_slicing,
4+
clippy::unwrap_used
5+
)]
6+
17
use crate::mock::*;
28
use frame_support::assert_ok;
39
use frame_system::Config;

pallets/subtensor/tests/migration.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(clippy::unwrap_used)]
2+
13
mod mock;
24
use frame_support::assert_ok;
35
use frame_system::Config;

pallets/subtensor/tests/registration.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(clippy::unwrap_used)]
2+
13
use frame_support::traits::Currency;
24

35
use crate::mock::*;

pallets/subtensor/tests/root.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(clippy::indexing_slicing, clippy::unwrap_used)]
2+
13
use crate::mock::*;
24
use frame_support::assert_ok;
35
use frame_system::Config;

pallets/subtensor/tests/senate.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(clippy::unwrap_used)]
2+
13
mod mock;
24
use mock::*;
35

pallets/subtensor/tests/staking.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(clippy::unwrap_used)]
2+
13
use frame_support::{assert_err, assert_noop, assert_ok, traits::Currency};
24
use frame_system::Config;
35
mod mock;

pallets/subtensor/tests/uids.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(clippy::unwrap_used)]
2+
13
use crate::mock::*;
24
use frame_support::assert_ok;
35
use frame_system::Config;

pallets/subtensor/tests/weights.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(clippy::indexing_slicing)]
2+
13
mod mock;
24
use frame_support::{
35
assert_ok,

runtime/tests/pallet_proxy.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(clippy::unwrap_used)]
2+
13
use frame_support::{assert_ok, traits::InstanceFilter, BoundedVec};
24
use node_subtensor_runtime::{
35
AccountId, BalancesCall, BuildStorage, Proxy, ProxyType, Runtime, RuntimeCall, RuntimeEvent,

0 commit comments

Comments
 (0)