File tree Expand file tree Collapse file tree 4 files changed +15
-9
lines changed
Expand file tree Collapse file tree 4 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 11[package ]
22
33name = " string_cache"
4- version = " 0.7.1 " # Also update README.md when making a semver-breaking change
4+ version = " 0.7.2 " # Also update README.md when making a semver-breaking change
55authors = [ " The Servo Project Developers" ]
66description = " A string interning library for Rust, developed as part of the Servo project."
77license = " MIT / Apache-2.0"
Original file line number Diff line number Diff line change 1212use phf_shared;
1313use serde:: { Deserialize , Deserializer , Serialize , Serializer } ;
1414
15- #[ allow( unused_imports) ] use std:: ascii:: AsciiExt ;
1615use std:: borrow:: Cow ;
1716use std:: cmp:: Ordering :: { self , Equal } ;
1817use std:: fmt;
Original file line number Diff line number Diff line change 11[package ]
22
33name = " string_cache_codegen"
4- version = " 0.4.0 " # Also update ../README.md when making a semver-breaking change
4+ version = " 0.4.1 " # Also update ../README.md when making a semver-breaking change
55authors = [ " The Servo Project Developers" ]
66description = " A codegen library for string-cache, developed as part of the Servo project."
77license = " MIT / Apache-2.0"
Original file line number Diff line number Diff line change @@ -192,7 +192,14 @@ impl AtomType {
192192 let atoms: Vec < & str > = map. iter ( ) . map ( |& idx| atoms[ idx] ) . collect ( ) ;
193193 let atoms_ref = & atoms;
194194 let empty_string_index = atoms. iter ( ) . position ( |s| s. is_empty ( ) ) . unwrap ( ) as u32 ;
195- let data = ( 0 ..atoms. len ( ) ) . map ( |i| proc_macro2:: Literal :: u64_suffixed ( shared:: pack_static ( i as u32 ) ) ) ;
195+ let data = ( 0 ..atoms. len ( ) ) . map ( |i| {
196+ format ! ( "0x{:X}u64" , shared:: pack_static( i as u32 ) )
197+ . parse :: < proc_macro2:: TokenStream > ( )
198+ . unwrap ( )
199+ . into_iter ( )
200+ . next ( )
201+ . unwrap ( )
202+ } ) ;
196203
197204 let hashes: Vec < u32 > =
198205 atoms. iter ( ) . map ( |string| {
@@ -217,11 +224,11 @@ impl AtomType {
217224 Some ( ref doc) => quote ! ( #[ doc = #doc] ) ,
218225 None => quote ! ( )
219226 } ;
220- let produce_term = |string : & str | proc_macro2:: Term :: new ( string, proc_macro2:: Span :: call_site ( ) ) ;
221- let static_set_name = produce_term ( & format ! ( "{}StaticSet" , type_name) ) ;
222- let type_name = produce_term ( type_name) ;
223- let macro_name = produce_term ( & * self . macro_name ) ;
224- let path = iter:: repeat ( produce_term ( & * self . path ) ) ;
227+ let new_term = |string : & str | proc_macro2:: Term :: new ( string, proc_macro2:: Span :: call_site ( ) ) ;
228+ let static_set_name = new_term ( & format ! ( "{}StaticSet" , type_name) ) ;
229+ let type_name = new_term ( type_name) ;
230+ let macro_name = new_term ( & * self . macro_name ) ;
231+ let path = iter:: repeat ( self . path . parse :: < proc_macro2 :: TokenStream > ( ) . unwrap ( ) ) ;
225232
226233 quote ! {
227234 #atom_doc
You can’t perform that action at this time.
0 commit comments