File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " string_cache_codegen"
3- version = " 0.5.0 " # Also update ../README.md when making a semver-breaking change
3+ version = " 0.5.1 " # Also update ../README.md when making a semver-breaking change
44authors = [ " The Servo Project Developers" ]
55description = " A codegen library for string-cache, developed as part of the Servo project."
66license = " MIT / Apache-2.0"
Original file line number Diff line number Diff line change @@ -227,10 +227,11 @@ impl AtomType {
227227 let type_name = new_term ( type_name) ;
228228 let macro_name = new_term ( & * self . macro_name ) ;
229229 let module = module. parse :: < proc_macro2:: TokenStream > ( ) . unwrap ( ) ;
230+ let atom_prefix = format ! ( "ATOM_{}_" , type_name. to_string( ) . to_uppercase( ) ) ;
230231 let const_names: Vec < _ > = atoms
231232 . iter ( )
232233 . map ( |atom| {
233- let mut name = String :: from ( "ATOM" ) ;
234+ let mut name = atom_prefix . clone ( ) ;
234235 for c in atom. chars ( ) {
235236 name. push_str ( & format ! ( "_{:02X}" , c as u32 ) )
236237 }
You can’t perform that action at this time.
0 commit comments