File tree Expand file tree Collapse file tree 5 files changed +3
-32
lines changed
tlv-account-resolution/src Expand file tree Collapse file tree 5 files changed +3
-32
lines changed Original file line number Diff line number Diff line change 11//! Error types
22use {
3- solana_decode_error:: DecodeError ,
43 solana_msg:: msg,
54 solana_program_error:: { PrintProgramError , ProgramError } ,
65} ;
@@ -35,11 +34,7 @@ impl<T> solana_decode_error::DecodeError<T> for PodSliceError {
3534impl PrintProgramError for PodSliceError {
3635 fn print < E > ( & self )
3736 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 ,
4338 {
4439 match self {
4540 PodSliceError :: CalculationFailure => {
Original file line number Diff line number Diff line change @@ -104,7 +104,6 @@ pub fn print_program_error(
104104 where
105105 E : ' static
106106 + std:: error:: Error
107- + #decode_error_import:: DecodeError <E >
108107 + #program_error_import:: PrintProgramError
109108 + num_traits:: FromPrimitive ,
110109 {
Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ impl solana_program_error::PrintProgramError for ExampleError {
2828 where
2929 E : ' static
3030 + std:: error:: Error
31- + solana_decode_error:: DecodeError < E >
3231 + solana_program_error:: PrintProgramError
3332 + num_traits:: FromPrimitive ,
3433 {
Original file line number Diff line number Diff line change 11//! Error types
22
33use {
4- solana_decode_error:: DecodeError ,
54 solana_msg:: msg,
65 solana_program_error:: { PrintProgramError , ProgramError } ,
76} ;
@@ -82,20 +81,10 @@ impl From<AccountResolutionError> for ProgramError {
8281 }
8382}
8483
85- impl < T > DecodeError < T > for AccountResolutionError {
86- fn type_of ( ) -> & ' static str {
87- "AccountResolutionError"
88- }
89- }
90-
9184impl PrintProgramError for AccountResolutionError {
9285 fn print < E > ( & self )
9386 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 ,
9988 {
10089 match self {
10190 AccountResolutionError :: IncorrectAccount => {
Original file line number Diff line number Diff line change 11//! Error types
22use {
3- solana_decode_error:: DecodeError ,
43 solana_msg:: msg,
54 solana_program_error:: { PrintProgramError , ProgramError } ,
65} ;
@@ -23,20 +22,10 @@ impl From<TlvError> for ProgramError {
2322 }
2423}
2524
26- impl < T > DecodeError < T > for TlvError {
27- fn type_of ( ) -> & ' static str {
28- "TlvError"
29- }
30- }
31-
3225impl PrintProgramError for TlvError {
3326 fn print < E > ( & self )
3427 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 ,
4029 {
4130 match self {
4231 TlvError :: TypeNotFound => {
You can’t perform that action at this time.
0 commit comments