@@ -62,7 +62,7 @@ macro_rules! async_request_handler {
6262 let mut res = :: ttrpc:: Response :: default ( ) ;
6363 match $class. service. $req_fn( & $ctx, req) . await {
6464 Ok ( rep) => {
65- res. status = Some ( :: ttrpc:: get_status( :: ttrpc:: Code :: Ok , "" . to_string( ) ) ) ;
65+ res. status = Some ( :: ttrpc:: get_status( :: ttrpc:: Code :: OK , "" . to_string( ) ) ) ;
6666 rep. encode( & mut res. payload)
6767 . map_err( :: ttrpc:: err_to_others!( e, "Encoding error " ) ) ?;
6868 }
@@ -72,7 +72,7 @@ macro_rules! async_request_handler {
7272 }
7373 _ => {
7474 res. status = Some ( :: ttrpc:: get_status(
75- :: ttrpc:: Code :: Unknown ,
75+ :: ttrpc:: Code :: UNKNOWN ,
7676 format!( "{:?}" , x) ,
7777 ) ) ;
7878 }
@@ -123,7 +123,7 @@ macro_rules! async_client_streamimg_handler {
123123 let mut res = :: ttrpc:: Response :: default ( ) ;
124124 match $class. service. $req_fn( & $ctx, stream) . await {
125125 Ok ( rep) => {
126- res. status = Some ( :: ttrpc:: get_status( :: ttrpc:: Code :: Ok , "" . to_string( ) ) ) ;
126+ res. status = Some ( :: ttrpc:: get_status( :: ttrpc:: Code :: OK , "" . to_string( ) ) ) ;
127127 rep. encode( & mut res. payload)
128128 . map_err( :: ttrpc:: err_to_others!( e, "Encoding error " ) ) ?;
129129 }
@@ -133,7 +133,7 @@ macro_rules! async_client_streamimg_handler {
133133 }
134134 _ => {
135135 res. status = Some ( :: ttrpc:: get_status(
136- :: ttrpc:: Code :: Unknown ,
136+ :: ttrpc:: Code :: UNKNOWN ,
137137 format!( "{:?}" , x) ,
138138 ) ) ;
139139 }
@@ -195,7 +195,7 @@ macro_rules! async_server_streamimg_handler {
195195 }
196196 _ => {
197197 res. status = Some ( :: ttrpc:: get_status(
198- :: ttrpc:: Code :: Unknown ,
198+ :: ttrpc:: Code :: UNKNOWN ,
199199 format!( "{:?}" , x) ,
200200 ) ) ;
201201 }
@@ -252,7 +252,7 @@ macro_rules! async_duplex_streamimg_handler {
252252 }
253253 _ => {
254254 res. status = Some ( :: ttrpc:: get_status(
255- :: ttrpc:: Code :: Unknown ,
255+ :: ttrpc:: Code :: UNKNOWN ,
256256 format!( "{:?}" , x) ,
257257 ) ) ;
258258 }
0 commit comments