Remove unwrap (#16652) (#16657)

(cherry picked from commit 01786f684e)

Co-authored-by: Jack May <jack@solana.com>
This commit is contained in:
mergify[bot]
2021-04-20 04:45:37 +00:00
committed by GitHub
parent 6da06654ff
commit 3865219085
5 changed files with 37 additions and 17 deletions

View File

@@ -107,7 +107,7 @@ pub enum InstructionError {
AccountBorrowFailed,
/// Account data has an outstanding reference after a program's execution
#[error("instruction left account with an outstanding reference borrowed")]
#[error("instruction left account with an outstanding borrowed reference")]
AccountBorrowOutstanding,
/// The same account was multiply passed to an on-chain program's entrypoint, but the program

View File

@@ -94,6 +94,10 @@ pub enum TransactionError {
#[error("Transactions are currently disabled due to cluster maintenance")]
ClusterMaintenance,
/// Transaction processing left an account with an outstanding borrowed reference
#[error("Transaction processing left an account with an outstanding borrowed reference")]
AccountBorrowOutstanding,
}
pub type Result<T> = result::Result<T, TransactionError>;