File tree 5 files changed +3
-32
lines changed
tlv-account-resolution/src
5 files changed +3
-32
lines changed Original file line number Diff line number Diff line change 1
1
//! Error types
2
2
use {
3
- solana_decode_error:: DecodeError ,
4
3
solana_msg:: msg,
5
4
solana_program_error:: { PrintProgramError , ProgramError } ,
6
5
} ;
@@ -35,11 +34,7 @@ impl<T> solana_decode_error::DecodeError<T> for PodSliceError {
35
34
impl PrintProgramError for PodSliceError {
36
35
fn print < E > ( & self )
37
36
where
38
- E : ' static
39
- + std:: error:: Error
40
- + DecodeError < E >
41
- + PrintProgramError
42
- + num_traits:: FromPrimitive ,
37
+ E : ' static + std:: error:: Error + PrintProgramError + num_traits:: FromPrimitive ,
43
38
{
44
39
match self {
45
40
PodSliceError :: CalculationFailure => {
Original file line number Diff line number Diff line change @@ -104,7 +104,6 @@ pub fn print_program_error(
104
104
where
105
105
E : ' static
106
106
+ std:: error:: Error
107
- + #decode_error_import:: DecodeError <E >
108
107
+ #program_error_import:: PrintProgramError
109
108
+ num_traits:: FromPrimitive ,
110
109
{
Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ impl solana_program_error::PrintProgramError for ExampleError {
28
28
where
29
29
E : ' static
30
30
+ std:: error:: Error
31
- + solana_decode_error:: DecodeError < E >
32
31
+ solana_program_error:: PrintProgramError
33
32
+ num_traits:: FromPrimitive ,
34
33
{
Original file line number Diff line number Diff line change 1
1
//! Error types
2
2
3
3
use {
4
- solana_decode_error:: DecodeError ,
5
4
solana_msg:: msg,
6
5
solana_program_error:: { PrintProgramError , ProgramError } ,
7
6
} ;
@@ -82,20 +81,10 @@ impl From<AccountResolutionError> for ProgramError {
82
81
}
83
82
}
84
83
85
- impl < T > DecodeError < T > for AccountResolutionError {
86
- fn type_of ( ) -> & ' static str {
87
- "AccountResolutionError"
88
- }
89
- }
90
-
91
84
impl PrintProgramError for AccountResolutionError {
92
85
fn print < E > ( & self )
93
86
where
94
- E : ' static
95
- + std:: error:: Error
96
- + DecodeError < E >
97
- + PrintProgramError
98
- + num_traits:: FromPrimitive ,
87
+ E : ' static + std:: error:: Error + PrintProgramError + num_traits:: FromPrimitive ,
99
88
{
100
89
match self {
101
90
AccountResolutionError :: IncorrectAccount => {
Original file line number Diff line number Diff line change 1
1
//! Error types
2
2
use {
3
- solana_decode_error:: DecodeError ,
4
3
solana_msg:: msg,
5
4
solana_program_error:: { PrintProgramError , ProgramError } ,
6
5
} ;
@@ -23,20 +22,10 @@ impl From<TlvError> for ProgramError {
23
22
}
24
23
}
25
24
26
- impl < T > DecodeError < T > for TlvError {
27
- fn type_of ( ) -> & ' static str {
28
- "TlvError"
29
- }
30
- }
31
-
32
25
impl PrintProgramError for TlvError {
33
26
fn print < E > ( & self )
34
27
where
35
- E : ' static
36
- + std:: error:: Error
37
- + DecodeError < E >
38
- + PrintProgramError
39
- + num_traits:: FromPrimitive ,
28
+ E : ' static + std:: error:: Error + PrintProgramError + num_traits:: FromPrimitive ,
40
29
{
41
30
match self {
42
31
TlvError :: TypeNotFound => {
You can’t perform that action at this time.
0 commit comments