Skip to content

Commit

Permalink
rustfmt: use entrypoint full path
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalojoec committed Nov 7, 2023
1 parent a115798 commit f3941d6
Show file tree
Hide file tree
Showing 35 changed files with 83 additions and 123 deletions.
5 changes: 1 addition & 4 deletions account-compression/programs/noop/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ use solana_program::{
declare_id!("noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV");

#[cfg(not(feature = "no-entrypoint"))]
use solana_program::entrypoint;

#[cfg(not(feature = "no-entrypoint"))]
entrypoint!(noop);
solana_program::entrypoint!(noop);

pub fn noop(
_program_id: &Pubkey,
Expand Down
6 changes: 2 additions & 4 deletions associated-token-account/program/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
#![cfg(not(feature = "no-entrypoint"))]

use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,
};
use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 2 additions & 4 deletions binary-option/program/src/entrypoint.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#![cfg(all(target_os = "solana", not(feature = "no-entrypoint")))]

use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,
};
use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey};

use crate::processor::Processor;

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 3 additions & 3 deletions binary-oracle-pair/program/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

use crate::{error::PoolError, processor};
use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult,
program_error::PrintProgramError, pubkey::Pubkey,
account_info::AccountInfo, entrypoint::ProgramResult, program_error::PrintProgramError,
pubkey::Pubkey,
};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 2 additions & 4 deletions examples/rust/cross-program-invocation/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
#![cfg(not(feature = "no-entrypoint"))]

use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,
};
use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
3 changes: 1 addition & 2 deletions examples/rust/custom-heap/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use solana_program::{
account_info::AccountInfo,
entrypoint,
entrypoint::{ProgramResult, HEAP_LENGTH, HEAP_START_ADDRESS},
pubkey::Pubkey,
};
Expand Down Expand Up @@ -44,7 +43,7 @@ unsafe impl std::alloc::GlobalAlloc for BumpAllocator {
#[global_allocator]
static A: BumpAllocator = BumpAllocator;

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 2 additions & 4 deletions examples/rust/logging/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
#![cfg(not(feature = "no-entrypoint"))]

use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,
};
use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 2 additions & 4 deletions examples/rust/sysvar/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
#![cfg(not(feature = "no-entrypoint"))]

use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,
};
use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 2 additions & 4 deletions examples/rust/transfer-lamports/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
#![cfg(not(feature = "no-entrypoint"))]

use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,
};
use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 2 additions & 4 deletions examples/rust/transfer-tokens/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
#![cfg(not(feature = "no-entrypoint"))]

use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,
};
use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 2 additions & 4 deletions feature-gate/program/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
use {
crate::processor,
solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,
},
solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey},
};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 2 additions & 4 deletions feature-proposal/program/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
#![cfg(all(target_os = "solana", not(feature = "no-entrypoint")))]

use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,
};
use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 3 additions & 3 deletions governance/addin-mock/program/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

use crate::{error::VoterWeightAddinError, processor};
use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult,
program_error::PrintProgramError, pubkey::Pubkey,
account_info::AccountInfo, entrypoint::ProgramResult, program_error::PrintProgramError,
pubkey::Pubkey,
};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 3 additions & 3 deletions governance/chat/program/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

use crate::{error::GovernanceChatError, processor};
use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult,
program_error::PrintProgramError, pubkey::Pubkey,
account_info::AccountInfo, entrypoint::ProgramResult, program_error::PrintProgramError,
pubkey::Pubkey,
};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 3 additions & 3 deletions governance/program/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

use crate::{error::GovernanceError, processor};
use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult,
program_error::PrintProgramError, pubkey::Pubkey,
account_info::AccountInfo, entrypoint::ProgramResult, program_error::PrintProgramError,
pubkey::Pubkey,
};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 2 additions & 4 deletions instruction-padding/program/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
#![cfg(not(feature = "no-entrypoint"))]

use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,
};
use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 2 additions & 4 deletions libraries/math/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
#![cfg(not(feature = "no-entrypoint"))]

use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,
};
use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 2 additions & 4 deletions memo/program/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
#![cfg(not(feature = "no-entrypoint"))]

use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,
};
use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 3 additions & 3 deletions name-service/program/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ use {
crate::processor::Processor,
num_traits::FromPrimitive,
solana_program::{
account_info::AccountInfo, decode_error::DecodeError, entrypoint,
entrypoint::ProgramResult, msg, program_error::PrintProgramError, pubkey::Pubkey,
account_info::AccountInfo, decode_error::DecodeError, entrypoint::ProgramResult, msg,
program_error::PrintProgramError, pubkey::Pubkey,
},
};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);

pub fn process_instruction(
program_id: &Pubkey,
Expand Down
6 changes: 2 additions & 4 deletions record/program/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
#![cfg(all(target_os = "solana", not(feature = "no-entrypoint")))]

use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,
};
use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 3 additions & 3 deletions single-pool/program/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
use {
crate::{error::SinglePoolError, processor::Processor},
solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult,
program_error::PrintProgramError, pubkey::Pubkey,
account_info::AccountInfo, entrypoint::ProgramResult, program_error::PrintProgramError,
pubkey::Pubkey,
},
};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 3 additions & 3 deletions stake-pool/program/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
use {
crate::{error::StakePoolError, processor::Processor},
solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult,
program_error::PrintProgramError, pubkey::Pubkey,
account_info::AccountInfo, entrypoint::ProgramResult, program_error::PrintProgramError,
pubkey::Pubkey,
},
};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 2 additions & 4 deletions stateless-asks/program/src/entrypoint.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#![cfg(all(target_os = "solana", not(feature = "no-entrypoint")))]

use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,
};
use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey};

use crate::processor::Processor;

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 3 additions & 3 deletions token-collection/program/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
use {
crate::processor,
solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult,
program_error::PrintProgramError, pubkey::Pubkey,
account_info::AccountInfo, entrypoint::ProgramResult, program_error::PrintProgramError,
pubkey::Pubkey,
},
spl_token_group_interface::error::TokenGroupError,
};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 3 additions & 3 deletions token-group/example/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
use {
crate::processor,
solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult,
program_error::PrintProgramError, pubkey::Pubkey,
account_info::AccountInfo, entrypoint::ProgramResult, program_error::PrintProgramError,
pubkey::Pubkey,
},
spl_token_group_interface::error::TokenGroupError,
};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 2 additions & 4 deletions token-lending/flash_loan_receiver/src/entrypoint.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,
};
use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
6 changes: 3 additions & 3 deletions token-lending/program/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

use crate::{error::LendingError, processor};
use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult,
program_error::PrintProgramError, pubkey::Pubkey,
account_info::AccountInfo, entrypoint::ProgramResult, program_error::PrintProgramError,
pubkey::Pubkey,
};

entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down
Loading

0 comments on commit f3941d6

Please sign in to comment.