File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 11use synstructure;
22use syn:: { self , Meta , NestedMeta } ;
3- use proc_macro2:: { self , Ident , Span } ;
3+ use proc_macro2:: { self , Ident } ;
44
55struct Attributes {
66 ignore : bool ,
7- project : Option < String > ,
7+ project : Option < Ident > ,
88}
99
1010fn parse_attributes ( field : & syn:: Field ) -> Attributes {
@@ -29,7 +29,7 @@ fn parse_attributes(field: &syn::Field) -> Attributes {
2929 if let Meta :: List ( list) = meta {
3030 if let Some ( nested) = list. nested . iter ( ) . next ( ) {
3131 if let NestedMeta :: Meta ( meta) = nested {
32- attrs. project = Some ( meta. name ( ) . to_string ( ) ) ;
32+ attrs. project = Some ( meta. name ( ) ) ;
3333 any_attr = true ;
3434 }
3535 }
@@ -55,7 +55,6 @@ pub fn hash_stable_derive(mut s: synstructure::Structure) -> proc_macro2::TokenS
5555 if attrs. ignore {
5656 quote ! { }
5757 } else if let Some ( project) = attrs. project {
58- let project = Ident :: new ( & project, Span :: call_site ( ) ) ;
5958 quote ! {
6059 & #bi. #project. hash_stable( __hcx, __hasher) ;
6160 }
You can’t perform that action at this time.
0 commit comments