File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
1
use synstructure;
2
2
use syn:: { self , Meta , NestedMeta } ;
3
- use proc_macro2:: { self , Ident , Span } ;
3
+ use proc_macro2:: { self , Ident } ;
4
4
5
5
struct Attributes {
6
6
ignore : bool ,
7
- project : Option < String > ,
7
+ project : Option < Ident > ,
8
8
}
9
9
10
10
fn parse_attributes ( field : & syn:: Field ) -> Attributes {
@@ -29,7 +29,7 @@ fn parse_attributes(field: &syn::Field) -> Attributes {
29
29
if let Meta :: List ( list) = meta {
30
30
if let Some ( nested) = list. nested . iter ( ) . next ( ) {
31
31
if let NestedMeta :: Meta ( meta) = nested {
32
- attrs. project = Some ( meta. name ( ) . to_string ( ) ) ;
32
+ attrs. project = Some ( meta. name ( ) ) ;
33
33
any_attr = true ;
34
34
}
35
35
}
@@ -55,7 +55,6 @@ pub fn hash_stable_derive(mut s: synstructure::Structure) -> proc_macro2::TokenS
55
55
if attrs. ignore {
56
56
quote ! { }
57
57
} else if let Some ( project) = attrs. project {
58
- let project = Ident :: new ( & project, Span :: call_site ( ) ) ;
59
58
quote ! {
60
59
& #bi. #project. hash_stable( __hcx, __hasher) ;
61
60
}
You can’t perform that action at this time.
0 commit comments