fix(build): snake_case service names (#190)

This commit is contained in:
Juan Alvarez
2019-12-14 15:08:28 -05:00
committed by Lucio Franco
parent 82facb6283
commit 3a5c66d5f2
8 changed files with 42 additions and 14 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
use crate::generate_doc_comments;
use crate::{generate_doc_comments, naive_snake_case};
use proc_macro2::TokenStream;
use prost_build::{Method, Service};
use quote::{format_ident, quote};
pub(crate) fn generate(service: &Service, proto: &str) -> TokenStream {
let service_ident = quote::format_ident!("{}Client", service.name);
let client_mod = quote::format_ident!("{}_client", service.name.to_ascii_lowercase());
let client_mod = quote::format_ident!("{}_client", naive_snake_case(&service.name));
let methods = generate_methods(service, proto);
let connect = generate_connect(&service_ident);