master
Skye 2 years ago
parent 12536c2d5c
commit 96345d7a4a

@ -80,11 +80,11 @@ pub fn gen_fsm(item: TokenStream) -> TokenStream {
fn to_ident(name: &str) -> Ident { fn to_ident(name: &str) -> Ident {
Ident::new( Ident::new(
&name &name
.replace(';', " semicolon") // Sanitize ident-unsafe characters .replace(' ', " space ")
.replace('!', " exclamation") .replace(';', " semicolon ") // Sanitize ident-unsafe characters
.replace(',', " comma") .replace('!', " exclamation ")
.replace('.', " period") // I'm not calling it a full stop .replace(',', " comma ")
.replace(' ', " space") .replace('.', " period ") // I'm not calling it a full stop
.to_case(Case::Pascal), .to_case(Case::Pascal),
Span::call_site().into(), Span::call_site().into(),
) )

Loading…
Cancel
Save