From 4fefc7d06c8da093e783852c5f0d3aea31e2c939 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Fri, 12 Jun 2020 02:06:28 +0300 Subject: Simplify --- xtask/src/codegen/gen_syntax.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xtask/src') diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs index 19d5594f5..f8b34638b 100644 --- a/xtask/src/codegen/gen_syntax.rs +++ b/xtask/src/codegen/gen_syntax.rs @@ -68,7 +68,7 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: AstSrc<'_>) -> Result { .iter() .map(|node| { let name = format_ident!("{}", node.name); - let kind = format_ident!("{}", to_upper_snake_case(&name.to_string())); + let kind = format_ident!("{}", to_upper_snake_case(node.name)); let traits = node.traits.iter().map(|trait_name| { let trait_name = format_ident!("{}", trait_name); quote!(impl ast::#trait_name for #name {}) -- cgit v1.2.3