fix some issues

This commit is contained in:
vms 2021-04-28 13:51:55 +03:00
parent 3d884e5791
commit 455ab15930
2 changed files with 3 additions and 2 deletions

View File

@ -34,7 +34,7 @@ pub(super) fn generate_records(records: &FCERecordTypes) -> TResult<Vec<TokenStr
#[derive(Clone, fluence_test::internal::serde::Serialize, fluence_test::internal::serde::Deserialize)]
#[serde(crate = "fluence_test::internal::serde")]
pub struct #record_name_ident {
#(#fields),*
#(pub #fields),*
}
};

View File

@ -37,7 +37,8 @@ pub(super) fn generate_struct_name(struct_name: &str) -> TResult<syn::Ident> {
}
pub(super) fn new_ident(ident_str: &str) -> TResult<syn::Ident> {
syn::parse_str::<syn::Ident>(ident_str).map_err(Into::into)
let ident_str = ident_str.replace('-', "_");
syn::parse_str::<syn::Ident>(&ident_str).map_err(Into::into)
}
pub(super) fn itype_to_tokens(itype: &IType, records: &FCERecordTypes) -> TResult<TokenStream> {