Skip to content

Commit cdfffaf

Browse files
committed
fix clippy
1 parent 998867e commit cdfffaf

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

runtime/src/precompiles/staking.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl StakingPrecompile {
8383

8484
let (hotkey, _) = get_pubkey(data)?;
8585
let amount: U256 = handle.context().apparent_value;
86-
let netuid = Self::parse_netuid(data, 0x3E)?;
86+
let netuid = parse_netuid(data, 0x3E)?;
8787

8888
if !amount.is_zero() {
8989
Self::transfer_back_to_caller(&account_id, amount)?;
@@ -108,7 +108,7 @@ impl StakingPrecompile {
108108
handle.context().caller,
109109
);
110110
let (hotkey, _) = get_pubkey(data)?;
111-
let netuid = Self::parse_netuid(data, 0x5E)?;
111+
let netuid = parse_netuid(data, 0x5E)?;
112112

113113
// We have to treat this as uint256 (because of Solidity ABI encoding rules, it pads uint64),
114114
// but this will never exceed 8 bytes, se we will ignore higher bytes and will only use lower

runtime/src/precompiles/subnet.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ pub const MAX_PARAMETER_SIZE: usize = 3 * MAX_SINGLE_PARAMETER_SIZE;
1616

1717
// ss58 public key i.e., the contract sends funds it received to the destination address from the
1818
// method parameter.
19+
#[allow(dead_code)]
1920
const CONTRACT_ADDRESS_SS58: [u8; 32] = [
2021
0x3a, 0x86, 0x18, 0xfb, 0xbb, 0x1b, 0xbc, 0x47, 0x86, 0x64, 0xff, 0x53, 0x46, 0x18, 0x0c, 0x35,
2122
0xd0, 0x9f, 0xac, 0x26, 0xf2, 0x02, 0x70, 0x85, 0xb3, 0x1c, 0x56, 0xc1, 0x06, 0x3c, 0x1c, 0xd3,

0 commit comments

Comments
 (0)