Skip to content

Commit

Permalink
Removing unwrap.
Browse files Browse the repository at this point in the history
  • Loading branch information
blockiosaurus committed Oct 31, 2024
1 parent 5b3cb24 commit c5ad4d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/rust/utils/src/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ pub fn close_account_raw<'a>(
let dest_starting_lamports = dest_account_info.lamports();
**dest_account_info.lamports.borrow_mut() = dest_starting_lamports
.checked_add(src_account_info.lamports())
.unwrap();
.ok_or(ProgramError::InvalidRealloc)?;
**src_account_info.lamports.borrow_mut() = 0;

src_account_info.assign(&system_program::ID);
Expand Down

0 comments on commit c5ad4d5

Please sign in to comment.