We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de49b7d commit 3748c7aCopy full SHA for 3748c7a
p-token/src/processor/withdraw_excess_lamports.rs
@@ -22,6 +22,7 @@ pub fn process_withdraw_excess_lamports(accounts: &[AccountInfo]) -> ProgramResu
22
23
match source_data.len() {
24
Account::LEN => {
25
+ // SAFETY: `source_data` has the same length as `Account`.
26
let account = unsafe { load::<Account>(source_data)? };
27
28
if account.is_native() {
@@ -31,6 +32,7 @@ pub fn process_withdraw_excess_lamports(accounts: &[AccountInfo]) -> ProgramResu
31
32
validate_owner(&account.owner, authority_info, remaining)?;
33
}
34
Mint::LEN => {
35
+ // SAFETY: `source_data` has the same length as `Mint`.
36
let mint = unsafe { load::<Mint>(source_data)? };
37
38
if let Some(mint_authority) = mint.mint_authority() {
0 commit comments