Skip to content

Commit c5d826e

Browse files
committed
chore: clippy
1 parent 7885cd1 commit c5d826e

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

pallets/subtensor/src/coinbase/run_coinbase.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,11 +476,11 @@ impl<T: Config> Pallet<T> {
476476

477477
// Get the hotkey's stake including weight
478478
let root_stake: I96F32 = I96F32::from_num(Self::get_stake_for_hotkey_on_subnet(
479-
&hotkey,
479+
hotkey,
480480
Self::get_root_netuid(),
481481
));
482482
let alpha_stake: I96F32 =
483-
I96F32::from_num(Self::get_stake_for_hotkey_on_subnet(&hotkey, netuid));
483+
I96F32::from_num(Self::get_stake_for_hotkey_on_subnet(hotkey, netuid));
484484

485485
// Calculate the
486486
let alpha_contribution: I96F32 = alpha_stake.saturating_mul(remaining_proportion);

pallets/subtensor/src/staking/stake_utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ impl<T: Config> Pallet<T> {
106106

107107
// Step 1: Get stake of hotkey (neuron)
108108
let alpha_stake =
109-
I64F64::from_num(Self::get_inherited_for_hotkey_on_subnet(&hotkey, netuid));
109+
I64F64::from_num(Self::get_inherited_for_hotkey_on_subnet(hotkey, netuid));
110110
log::trace!("alpha_stake: {:?}", alpha_stake);
111111

112112
// Step 2: Get the global tao stake for the hotkey
113-
let tao_stake = I64F64::from_num(Self::get_inherited_for_hotkey_on_subnet(&hotkey, 0));
113+
let tao_stake = I64F64::from_num(Self::get_inherited_for_hotkey_on_subnet(hotkey, 0));
114114
log::trace!("tao_stake: {:?}", tao_stake);
115115

116116
// Step 3: Combine alpha and tao stakes

pallets/subtensor/src/tests/coinbase.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use sp_core::U256;
77
use substrate_fixed::types::I64F64;
88
use substrate_fixed::types::I96F32;
99

10+
#[allow(clippy::arithmetic_side_effects)]
1011
fn close(value: u64, target: u64, eps: u64) {
1112
assert!(
1213
(value as i64 - target as i64).abs() < eps as i64,

0 commit comments

Comments
 (0)