Skip to content

Commit bd3ddde

Browse files
committed
🚨 Fixing linter warnings
1 parent 4db70da commit bd3ddde

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

crates/bolt-lang/attribute/src/component/generate/program.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ fn modify_component_module(
3535
items.extend(
3636
vec![initialize_fn, initialize_struct, destroy_fn, destroy_struct]
3737
.into_iter()
38-
.map(|item| syn::parse2(item).expect("Failed to parse generate initialize and destroy item"))
38+
.map(|item| {
39+
syn::parse2(item).expect("Failed to parse generate initialize and destroy item")
40+
})
3941
.collect::<Vec<_>>(),
4042
);
4143

crates/bolt-lang/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ pub fn pubkey_from_str(s: &str) -> solana_program::pubkey::Pubkey {
8888
impl BoltMetadata {
8989
pub fn try_from_account_info(account: &AccountInfo) -> Result<Self> {
9090
let data = account.try_borrow_data()?;
91-
require!(data.len() >= 8 + BoltMetadata::INIT_SPACE, ErrorCode::AccountDidNotDeserialize);
91+
require!(
92+
data.len() >= 8 + BoltMetadata::INIT_SPACE,
93+
ErrorCode::AccountDidNotDeserialize
94+
);
9295
let slice = &data[8..8 + BoltMetadata::INIT_SPACE];
9396
Ok(BoltMetadata::try_from_slice(slice)?)
9497
}

crates/programs/world/src/lib.rs

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -558,19 +558,15 @@ fn system_execute<'info>(
558558
use anchor_lang::solana_program::instruction::{AccountMeta, Instruction};
559559
use anchor_lang::solana_program::program::invoke;
560560

561-
let mut accounts = vec![
562-
AccountMeta {
563-
pubkey: authority.key(),
564-
is_signer: authority.is_signer,
565-
is_writable: authority.is_writable,
566-
}
567-
];
568-
accounts.extend(remaining_accounts.iter().map(|account| {
569-
AccountMeta {
570-
pubkey: account.key(),
571-
is_signer: account.is_signer,
572-
is_writable: account.is_writable,
573-
}
561+
let mut accounts = vec![AccountMeta {
562+
pubkey: authority.key(),
563+
is_signer: authority.is_signer,
564+
is_writable: authority.is_writable,
565+
}];
566+
accounts.extend(remaining_accounts.iter().map(|account| AccountMeta {
567+
pubkey: account.key(),
568+
is_signer: account.is_signer,
569+
is_writable: account.is_writable,
574570
}));
575571

576572
let mut account_infos = vec![authority.to_account_info()];

0 commit comments

Comments
 (0)