Skip to content

Commit 92a6954

Browse files
committed
Update create_pda.rs
1 parent 290da30 commit 92a6954

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

basics/favorites/pinocchio/program/src/instructions/create_pda.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub fn create_pda(program_id: &Pubkey, accounts: &[AccountInfo], data: &[u8]) ->
2626
}
2727

2828
// Checking if the pda is already initialized
29-
if favorite_account.try_borrow_data()?.len() == 0 {
29+
if favorite_account.try_borrow_data()?.is_empty() {
3030
let rent = Rent::get()?;
3131

3232
// Initialize the favorite account if it's not initialized

0 commit comments

Comments
 (0)