mirror of
https://github.com/bytedream/serde-inline-default.git
synced 2025-05-09 12:15:13 +02:00
fix: apply syn update changes
This commit is contained in:
parent
cc8120fb4a
commit
85b1fbdfcd
@ -7,12 +7,11 @@ pub(crate) fn expand_struct(mut item: ItemStruct) -> proc_macro::TokenStream {
|
|||||||
|
|
||||||
for (i, field) in item.fields.iter_mut().enumerate() {
|
for (i, field) in item.fields.iter_mut().enumerate() {
|
||||||
for (j, attr) in field.attrs.iter_mut().enumerate() {
|
for (j, attr) in field.attrs.iter_mut().enumerate() {
|
||||||
if !attr.path.is_ident("serde_inline_default") {
|
if !attr.path().is_ident("serde_inline_default") {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let _default_str = attr.tokens.to_string();
|
let default: TokenStream = attr.parse_args().unwrap();
|
||||||
let default: TokenStream = _default_str[1.._default_str.len() - 1].parse().unwrap();
|
|
||||||
|
|
||||||
// we check here if a function with the exact same return value already exists. if so,
|
// we check here if a function with the exact same return value already exists. if so,
|
||||||
// this function gets used.
|
// this function gets used.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user