Migrate to thiserror (#7177)
* Migrate to thiserror * Discourage the use of other modules' Result alias `io::Result` set a bad precedent. Don't import other `Result` aliases.
This commit is contained in:
@@ -18,6 +18,7 @@ serde = "1.0.103"
|
||||
serde_derive = "1.0.103"
|
||||
solana-sdk = { path = "../../sdk", version = "0.22.0" }
|
||||
solana-config-program = { path = "../config", version = "0.22.0" }
|
||||
thiserror = "1.0"
|
||||
|
||||
[dev-dependencies]
|
||||
solana-runtime = { path = "../../runtime", version = "0.22.0" }
|
||||
|
@@ -9,10 +9,14 @@ use solana_sdk::{
|
||||
pubkey::Pubkey,
|
||||
system_instruction,
|
||||
};
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, FromPrimitive)]
|
||||
#[derive(Error, Debug, Clone, PartialEq, FromPrimitive)]
|
||||
pub enum VestError {
|
||||
#[error("destination missing")]
|
||||
DestinationMissing,
|
||||
|
||||
#[error("unauthorized")]
|
||||
Unauthorized,
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user