aboutsummaryrefslogtreecommitdiff
path: root/mingling_macros/src/func/pack_structural.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-10 16:04:57 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-10 16:04:57 +0800
commiteebcdf6b163174ec1629d121264c0477652e3323 (patch)
treef3b56721e4159fe4069a4524ce9d1a47c865019d /mingling_macros/src/func/pack_structural.rs
parenta9d5943939261e27e58bcf5cacbb618a0f63e999 (diff)
refactor(macros): clean up clippy lints and simplify code
Diffstat (limited to 'mingling_macros/src/func/pack_structural.rs')
-rw-r--r--mingling_macros/src/func/pack_structural.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/mingling_macros/src/func/pack_structural.rs b/mingling_macros/src/func/pack_structural.rs
index 9399959..e5b2362 100644
--- a/mingling_macros/src/func/pack_structural.rs
+++ b/mingling_macros/src/func/pack_structural.rs
@@ -6,6 +6,7 @@ use crate::get_global_set;
/// `pack_structural!` — like `pack!` but also marks the type as supporting
/// structured output via `StructuralData`.
+#[allow(clippy::too_many_lines)]
pub(crate) fn pack_structural(input: TokenStream) -> TokenStream {
// Parse same input format as `pack!`
let input_parsed = syn::parse_macro_input!(input as PackStructuralInput);
@@ -159,7 +160,7 @@ impl syn::parse::Parse for PackStructuralInput {
let type_name: Ident = input.parse()?;
input.parse::<syn::Token![=]>()?;
let inner_type: syn::Type = input.parse()?;
- Ok(PackStructuralInput {
+ Ok(Self {
attrs,
type_name,
inner_type,