Add script for running nightly rustfmt on all workspaces (#23244)

* Add script for running nightly rustfmt on all workspaces

* invalidate ci cache
This commit is contained in:
Justin Starry
2022-02-22 11:59:06 +08:00
committed by GitHub
parent 72c68695b5
commit c97f34a0fd
46 changed files with 327 additions and 296 deletions

View File

@ -1,18 +1,19 @@
//! Example Rust-based BPF program that exercises error handling
extern crate solana_program;
use num_derive::FromPrimitive;
use num_traits::FromPrimitive;
use solana_program::{
account_info::AccountInfo,
decode_error::DecodeError,
entrypoint,
entrypoint::ProgramResult,
msg,
program_error::{PrintProgramError, ProgramError},
pubkey::{Pubkey, PubkeyError},
use {
num_derive::FromPrimitive,
num_traits::FromPrimitive,
solana_program::{
account_info::AccountInfo,
decode_error::DecodeError,
entrypoint::ProgramResult,
msg,
program_error::{PrintProgramError, ProgramError},
pubkey::{Pubkey, PubkeyError},
},
thiserror::Error,
};
use thiserror::Error;
/// Custom program errors
#[derive(Error, Debug, Clone, PartialEq, FromPrimitive)]
@ -44,7 +45,7 @@ impl PrintProgramError for MyError {
}
}
entrypoint!(process_instruction);
solana_program::entrypoint!(process_instruction);
fn process_instruction(
_program_id: &Pubkey,
accounts: &[AccountInfo],