diff --git a/rustler_codegen/src/context.rs b/rustler_codegen/src/context.rs index 6988734c..077da964 100644 --- a/rustler_codegen/src/context.rs +++ b/rustler_codegen/src/context.rs @@ -86,7 +86,10 @@ impl<'a> Context<'a> { } pub fn atoms_module_name(&self, span: Span) -> Ident { - Ident::new(&format!("RUSTLER_ATOMS_{}", self.ident), span) + Ident::new( + &format!("rustler_atoms_{}", self.ident).to_snake_case(), + span, + ) } pub fn encode(&self) -> bool { diff --git a/rustler_codegen/src/ex_struct.rs b/rustler_codegen/src/ex_struct.rs index 4d720606..e051c494 100644 --- a/rustler_codegen/src/ex_struct.rs +++ b/rustler_codegen/src/ex_struct.rs @@ -53,7 +53,6 @@ pub fn transcoder_decorator(ast: &syn::DeriveInput, add_exception: bool) -> Toke }; let gen = quote! { - #[allow(non_snake_case)] mod #atoms_module_name { #atom_defs }