Skip to content

Commit

Permalink
Apply clippy suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
pgarg66 committed Mar 18, 2023
1 parent 1c62d87 commit ead201a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions runtime/src/accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,11 +393,12 @@ impl Accounts {
}

if bpf_loader_upgradeable::check_id(account.owner()) {
if !feature_set.is_active(&simplify_writable_program_account_check::id()) {
if message.is_writable(i) && !message.is_upgradeable_loader_present() {
error_counters.invalid_writable_account += 1;
return Err(TransactionError::InvalidWritableAccount);
}
if !feature_set.is_active(&simplify_writable_program_account_check::id())
&& message.is_writable(i)
&& !message.is_upgradeable_loader_present()
{
error_counters.invalid_writable_account += 1;
return Err(TransactionError::InvalidWritableAccount);
}

if account.executable() {
Expand Down

0 comments on commit ead201a

Please sign in to comment.