Skip to content

Commit 45c3520

Browse files
committed
🎨 Fix clippy.
1 parent 855303a commit 45c3520

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub fn derive_struct(input: TokenStream) -> TokenStream {
3333
let (structs, enums) = flatten(
3434
root_ident.to_string(),
3535
Rc::new(RefCell::new(0)),
36-
DeriveBox::Struct(input.clone()),
36+
DeriveBox::Struct(Box::new(input.clone())),
3737
)
3838
.expect("Failed to flatten");
3939

@@ -96,7 +96,7 @@ pub fn derive_enum(input: TokenStream) -> TokenStream {
9696
let (structs, enums) = flatten(
9797
root_ident.to_string(),
9898
Rc::new(RefCell::new(0)),
99-
DeriveBox::Enum(input.clone()),
99+
DeriveBox::Enum(Box::new(input.clone())),
100100
)
101101
.expect("Failed to flatten");
102102

src/tools/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,6 @@ pub(crate) type EnumsFlatten = Vec<(
131131

132132
#[derive(Debug, Clone)]
133133
pub(crate) enum DeriveBox {
134-
Struct(DeriveStruct),
135-
Enum(DeriveEnum),
134+
Struct(Box<DeriveStruct>),
135+
Enum(Box<DeriveEnum>),
136136
}

src/utils/flatten.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub(crate) fn flatten(
5454
let (sub_structs, sub_enums) = flatten(
5555
root_name.clone(),
5656
unique_id_count.clone(),
57-
DeriveBox::Struct(v.clone()),
57+
DeriveBox::Struct(Box::new(v.clone())),
5858
)?;
5959

6060
structs.extend(sub_structs);
@@ -95,7 +95,7 @@ pub(crate) fn flatten(
9595
let (sub_structs, sub_enums) = flatten(
9696
root_name.clone(),
9797
unique_id_count.clone(),
98-
DeriveBox::Enum(v.clone()),
98+
DeriveBox::Enum(Box::new(v.clone())),
9999
)?;
100100

101101
structs.extend(sub_structs);
@@ -197,7 +197,7 @@ pub(crate) fn flatten(
197197
let (sub_structs, sub_enums) = flatten(
198198
root_name.clone(),
199199
unique_id_count.clone(),
200-
DeriveBox::Struct(v.clone()),
200+
DeriveBox::Struct(Box::new(v.clone())),
201201
)?;
202202

203203
structs.extend(sub_structs);
@@ -241,7 +241,7 @@ pub(crate) fn flatten(
241241
let (sub_structs, sub_enums) = flatten(
242242
root_name.clone(),
243243
unique_id_count.clone(),
244-
DeriveBox::Enum(v.clone()),
244+
DeriveBox::Enum(Box::new(v.clone())),
245245
)?;
246246

247247
structs.extend(sub_structs);
@@ -311,7 +311,7 @@ pub(crate) fn flatten(
311311
let (sub_structs, sub_enums) = flatten(
312312
root_name.clone(),
313313
unique_id_count.clone(),
314-
DeriveBox::Struct(v.clone()),
314+
DeriveBox::Struct(Box::new(v.clone())),
315315
)?;
316316

317317
structs.extend(sub_structs);
@@ -362,7 +362,7 @@ pub(crate) fn flatten(
362362
let (sub_structs, sub_enums) = flatten(
363363
root_name.clone(),
364364
unique_id_count.clone(),
365-
DeriveBox::Enum(v.clone()),
365+
DeriveBox::Enum(Box::new(v.clone())),
366366
)?;
367367

368368
structs.extend(sub_structs);

0 commit comments

Comments
 (0)