Skip to content

Commit 71dcc38

Browse files
committed
solana: fix clippy warnings
1 parent a5f2a56 commit 71dcc38

File tree

1 file changed

+6
-10
lines changed
  • solana/programs/example-native-token-transfers/tests/sdk

1 file changed

+6
-10
lines changed

solana/programs/example-native-token-transfers/tests/sdk/accounts.rs

+6-10
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,13 @@ pub trait NTTAccounts {
107107
} = args;
108108
let mut hasher = Keccak256::new();
109109

110-
hasher.update(&amount.to_be_bytes());
111-
hasher.update(&recipient_chain.id.to_be_bytes());
112-
hasher.update(&recipient_address);
113-
hasher.update(&[*should_queue as u8]);
110+
hasher.update(amount.to_be_bytes());
111+
hasher.update(recipient_chain.id.to_be_bytes());
112+
hasher.update(recipient_address);
113+
hasher.update([*should_queue as u8]);
114114

115115
let (session_authority, _) = Pubkey::find_program_address(
116-
&[
117-
SESSION_AUTHORITY_SEED.as_ref(),
118-
sender.as_ref(),
119-
&hasher.finalize(),
120-
],
116+
&[SESSION_AUTHORITY_SEED, sender.as_ref(), &hasher.finalize()],
121117
&self.program(),
122118
);
123119
session_authority
@@ -141,7 +137,7 @@ pub trait NTTAccounts {
141137

142138
fn token_authority(&self) -> Pubkey {
143139
let (token_authority, _) =
144-
Pubkey::find_program_address(&[TOKEN_AUTHORITY_SEED.as_ref()], &self.program());
140+
Pubkey::find_program_address(&[TOKEN_AUTHORITY_SEED], &self.program());
145141
token_authority
146142
}
147143

0 commit comments

Comments
 (0)