Skip to content

Commit

Permalink
fix(build): Match namespace code with other generated packages (#472)
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerhawkes authored Oct 7, 2020
1 parent 0c69c37 commit 1b03ece
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tonic-build/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@ pub fn generate<T: Service>(service: &T, proto_path: &str) -> TokenStream {
let service_doc = generate_doc_comments(service.comment());

// Transport based implementations
let path = format!("{}.{}", service.package(), service.identifier());
let path = format!(
"{}{}{}",
service.package(),
if service.package().is_empty() {
""
} else {
"."
},
service.identifier()
);
let transport = generate_transport(&server_service, &server_trait, &path);

quote! {
Expand Down

0 comments on commit 1b03ece

Please sign in to comment.