File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ license = "Apache-2.0/MIT"
1313travis-ci = { repository = " TeXitoi/structopt" }
1414
1515[dependencies ]
16- syn = " 0.15"
16+ syn = " 0.15.10 "
1717quote = " 0.6"
1818proc-macro2 = " 0.4"
1919heck = " ^0.3.0"
Original file line number Diff line number Diff line change @@ -153,26 +153,25 @@ impl Attrs {
153153 use Meta :: * ;
154154 use NestedMeta :: * ;
155155
156- let structopt_attrs =
157- attrs
158- . iter ( )
159- . filter_map ( |attr| {
160- let path = & attr. path ;
161- match quote ! ( #path) . to_string ( ) . as_ref ( ) {
162- "structopt" => Some ( attr. interpret_meta ( ) . unwrap_or_else ( || {
163- panic ! ( "invalid structopt syntax: {}" , quote!( #attr) )
164- } ) ) ,
165- _ => None ,
166- }
167- } )
168- . flat_map ( |m| match m {
169- List ( l) => l. nested ,
170- tokens => panic ! ( "unsupported syntax: {}" , quote!( #tokens) . to_string( ) ) ,
171- } )
172- . map ( |m| match m {
173- Meta ( m) => m,
174- ref tokens => panic ! ( "unsupported syntax: {}" , quote!( #tokens) . to_string( ) ) ,
175- } ) ;
156+ let structopt_attrs = attrs
157+ . iter ( )
158+ . filter_map ( |attr| {
159+ let path = & attr. path ;
160+ match quote ! ( #path) . to_string ( ) . as_ref ( ) {
161+ "structopt" => Some ( attr. parse_meta ( ) . unwrap_or_else ( |e| {
162+ panic ! ( "invalid structopt syntax: {}: {}" , e, quote!( #attr) )
163+ } ) ) ,
164+ _ => None ,
165+ }
166+ } )
167+ . flat_map ( |m| match m {
168+ List ( l) => l. nested ,
169+ tokens => panic ! ( "unsupported syntax: {}" , quote!( #tokens) . to_string( ) ) ,
170+ } )
171+ . map ( |m| match m {
172+ Meta ( m) => m,
173+ ref tokens => panic ! ( "unsupported syntax: {}" , quote!( #tokens) . to_string( ) ) ,
174+ } ) ;
176175
177176 for attr in structopt_attrs {
178177 match attr {
You can’t perform that action at this time.
0 commit comments