@@ -253,7 +253,7 @@ impl TtrpcServiceGenerator {
253
253
quote ! ( let streams = HashMap :: new( ) ; )
254
254
} ;
255
255
let method_inserts: Vec < _ > = service. methods . iter ( ) . map ( |method| {
256
- let key = format ! ( "{}" , method. proto_name) ;
256
+ let key = method. proto_name . to_string ( ) ;
257
257
let mm = format_ident ! ( "{}Method" , to_camel_case( & method. proto_name) ) ;
258
258
match MethodType :: from_method ( method) {
259
259
MethodType :: Unary => {
@@ -349,7 +349,7 @@ impl TtrpcServiceGenerator {
349
349
let input = type_token ( & method. input_type ) ;
350
350
let output = type_token ( & method. output_type ) ;
351
351
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 ( ) ;
353
353
354
354
match MethodType :: from_method ( method) {
355
355
MethodType :: Unary => {
@@ -373,7 +373,7 @@ impl TtrpcServiceGenerator {
373
373
let input = type_token ( & method. input_type ) ;
374
374
let output = type_token ( & method. output_type ) ;
375
375
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 ( ) ;
377
377
378
378
let ( mut arg_tokens, ret_token, body_token) = match MethodType :: from_method ( method) {
379
379
MethodType :: Unary => (
@@ -497,7 +497,7 @@ enum Side {
497
497
}
498
498
499
499
fn async_on ( mode : AsyncMode , side : Side ) -> bool {
500
- return mode == AsyncMode :: All
500
+ mode == AsyncMode :: All
501
501
|| ( side == Side :: Server && mode == AsyncMode :: Server )
502
- || ( side == Side :: Client && mode == AsyncMode :: Client ) ;
502
+ || ( side == Side :: Client && mode == AsyncMode :: Client )
503
503
}
0 commit comments