mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Rust: Attempt to fix the stack overflow when constructing the item array
Workaround from https://github.com/rust-lang/rust/issues/53827
This commit is contained in:
parent
ecd790ff6e
commit
62e0fdd5bd
1 changed files with 1 additions and 1 deletions
|
@ -1489,7 +1489,7 @@ fn generate_item_tree(
|
|||
static ITEM_ARRAY : sp::OnceBox<
|
||||
[sp::VOffset<#inner_component_id, sp::ItemVTable, sp::AllowPin>; #item_array_len]
|
||||
> = sp::OnceBox::new();
|
||||
&*ITEM_ARRAY.get_or_init(|| sp::Box::new([#(#item_array),*]))
|
||||
&*ITEM_ARRAY.get_or_init(|| sp::vec![#(#item_array),*].into_boxed_slice().try_into().unwrap())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue