@@ -21,18 +21,18 @@ use crate::HyperlightError::ReturnValueConversionFailure;
2121use crate :: { log_then_return, Result } ;
2222
2323/// This is a marker trait that is used to indicate that a type is a valid Hyperlight return type.
24- pub trait SupportedReturnType < T > {
24+ pub trait SupportedReturnType : Sized {
2525 /// Gets the return type of the supported return value
2626 fn get_hyperlight_type ( ) -> ReturnType ;
2727
2828 /// Gets the value of the supported return value
2929 fn get_hyperlight_value ( & self ) -> ReturnValue ;
3030
3131 /// Gets the inner value of the supported return type
32- fn get_inner ( a : ReturnValue ) -> Result < T > ;
32+ fn get_inner ( a : ReturnValue ) -> Result < Self > ;
3333}
3434
35- impl SupportedReturnType < ( ) > for ( ) {
35+ impl SupportedReturnType for ( ) {
3636 #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
3737 fn get_hyperlight_type ( ) -> ReturnType {
3838 ReturnType :: Void
@@ -54,7 +54,7 @@ impl SupportedReturnType<()> for () {
5454 }
5555}
5656
57- impl SupportedReturnType < String > for String {
57+ impl SupportedReturnType for String {
5858 #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
5959 fn get_hyperlight_type ( ) -> ReturnType {
6060 ReturnType :: String
@@ -76,7 +76,7 @@ impl SupportedReturnType<String> for String {
7676 }
7777}
7878
79- impl SupportedReturnType < i32 > for i32 {
79+ impl SupportedReturnType for i32 {
8080 #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
8181 fn get_hyperlight_type ( ) -> ReturnType {
8282 ReturnType :: Int
@@ -98,7 +98,7 @@ impl SupportedReturnType<i32> for i32 {
9898 }
9999}
100100
101- impl SupportedReturnType < u32 > for u32 {
101+ impl SupportedReturnType for u32 {
102102 #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
103103 fn get_hyperlight_type ( ) -> ReturnType {
104104 ReturnType :: UInt
@@ -120,7 +120,7 @@ impl SupportedReturnType<u32> for u32 {
120120 }
121121}
122122
123- impl SupportedReturnType < i64 > for i64 {
123+ impl SupportedReturnType for i64 {
124124 #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
125125 fn get_hyperlight_type ( ) -> ReturnType {
126126 ReturnType :: Long
@@ -142,7 +142,7 @@ impl SupportedReturnType<i64> for i64 {
142142 }
143143}
144144
145- impl SupportedReturnType < u64 > for u64 {
145+ impl SupportedReturnType for u64 {
146146 #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
147147 fn get_hyperlight_type ( ) -> ReturnType {
148148 ReturnType :: ULong
@@ -164,7 +164,7 @@ impl SupportedReturnType<u64> for u64 {
164164 }
165165}
166166
167- impl SupportedReturnType < bool > for bool {
167+ impl SupportedReturnType for bool {
168168 #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
169169 fn get_hyperlight_type ( ) -> ReturnType {
170170 ReturnType :: Bool
@@ -186,7 +186,7 @@ impl SupportedReturnType<bool> for bool {
186186 }
187187}
188188
189- impl SupportedReturnType < Vec < u8 > > for Vec < u8 > {
189+ impl SupportedReturnType for Vec < u8 > {
190190 #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
191191 fn get_hyperlight_type ( ) -> ReturnType {
192192 ReturnType :: VecBytes
0 commit comments