Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion string-cache-codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "string_cache_codegen"
version = "0.5.0" # Also update ../README.md when making a semver-breaking change
version = "0.5.1" # Also update ../README.md when making a semver-breaking change
authors = [ "The Servo Project Developers" ]
description = "A codegen library for string-cache, developed as part of the Servo project."
license = "MIT / Apache-2.0"
Expand Down
3 changes: 2 additions & 1 deletion string-cache-codegen/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,11 @@ impl AtomType {
let type_name = new_term(type_name);
let macro_name = new_term(&*self.macro_name);
let module = module.parse::<proc_macro2::TokenStream>().unwrap();
let atom_prefix = format!("ATOM_{}_", type_name.to_string().to_uppercase());
let const_names: Vec<_> = atoms
.iter()
.map(|atom| {
let mut name = String::from("ATOM");
let mut name = atom_prefix.clone();
for c in atom.chars() {
name.push_str(&format!("_{:02X}", c as u32))
}
Expand Down