@@ -253,7 +253,7 @@ impl TtrpcServiceGenerator {
253253 quote ! ( let streams = HashMap :: new( ) ; )
254254 } ;
255255 let method_inserts: Vec < _ > = service. methods . iter ( ) . map ( |method| {
256- let key = format ! ( "{}" , method. proto_name) ;
256+ let key = method. proto_name . to_string ( ) ;
257257 let mm = format_ident ! ( "{}Method" , to_camel_case( & method. proto_name) ) ;
258258 match MethodType :: from_method ( method) {
259259 MethodType :: Unary => {
@@ -349,7 +349,7 @@ impl TtrpcServiceGenerator {
349349 let input = type_token ( & method. input_type ) ;
350350 let output = type_token ( & method. output_type ) ;
351351 let server_str = format ! ( "{}.{}" , service. package, service. name) ;
352- let method_str = format ! ( "{}" , method. proto_name) ;
352+ let method_str = method. proto_name . to_string ( ) ;
353353
354354 match MethodType :: from_method ( method) {
355355 MethodType :: Unary => {
@@ -373,7 +373,7 @@ impl TtrpcServiceGenerator {
373373 let input = type_token ( & method. input_type ) ;
374374 let output = type_token ( & method. output_type ) ;
375375 let server_str = format ! ( "{}.{}" , service. package, service. name) ;
376- let method_str = format ! ( "{}" , method. proto_name) ;
376+ let method_str = method. proto_name . to_string ( ) ;
377377
378378 let ( mut arg_tokens, ret_token, body_token) = match MethodType :: from_method ( method) {
379379 MethodType :: Unary => (
@@ -497,7 +497,7 @@ enum Side {
497497}
498498
499499fn async_on ( mode : AsyncMode , side : Side ) -> bool {
500- return mode == AsyncMode :: All
500+ mode == AsyncMode :: All
501501 || ( side == Side :: Server && mode == AsyncMode :: Server )
502- || ( side == Side :: Client && mode == AsyncMode :: Client ) ;
502+ || ( side == Side :: Client && mode == AsyncMode :: Client )
503503}
0 commit comments