Skip to content

Commit de4ff62

Browse files
committed
f add comment on whats going on
1 parent af0d2aa commit de4ff62

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lightning-macros/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ pub fn drop_legacy_field_definition(expr: TokenStream) -> TokenStream {
278278
if let syn::Expr::Macro(syn::ExprMacro { mac, .. }) = &field.expr {
279279
let macro_name = mac.path.segments.last().unwrap().ident.to_string();
280280
let is_init = macro_name == "_ignore_arg";
281+
// Skip `field_name` and `:`, giving us just the type's group
281282
let ty_tokens = mac.tokens.clone().into_iter().skip(2).next();
282283
if let Some(proc_macro2::TokenTree::Group(group)) = ty_tokens {
283284
let first_token = group.stream().into_iter().next();

0 commit comments

Comments
 (0)