diff --git a/compiler/src/codegen.rs b/compiler/src/codegen.rs index 382f5ae7..793fb9e4 100644 --- a/compiler/src/codegen.rs +++ b/compiler/src/codegen.rs @@ -145,7 +145,7 @@ impl<'a> MethodGen<'a> { "}", |w| { w.write_line(&format!( - "service: Arc>,", + "service: Box,", self.service_name )); }, @@ -430,7 +430,7 @@ impl<'a> MethodGen<'a> { struct ServiceGen<'a> { proto: &'a ServiceDescriptorProto, - methods: Vec>, + methods: Vec, customize: &'a Customize, package_name: String, } @@ -558,7 +558,7 @@ impl<'a> ServiceGen<'a> { fn write_sync_server_create(&self, w: &mut CodeWriter) { let method_handler_name = "::ttrpc::MethodHandler"; let s = format!( - "create_{}(service: Arc>) -> HashMap>", + "create_{}(service: Box) -> HashMap>", to_snake_case(&self.service_name()), self.service_name(), method_handler_name, @@ -577,7 +577,7 @@ impl<'a> ServiceGen<'a> { fn write_async_server_create(&self, w: &mut CodeWriter) { let s = format!( - "create_{}(service: Arc>) -> HashMap", + "create_{}(service: Box) -> HashMap", to_snake_case(&self.service_name()), self.service_name(), "::ttrpc::r#async::Service"