Related Problem
Box<Vec<Frame>> is double indirection, but is being used here to minimize the inline size so the box_collection clippy lint is being silenced.
Source:
|
pub(super) frames: Box<Vec<Frame>>, |
Proposed Solution
The ThinVec crate can be used to remove the double indirection while keeping the single inline pointer size by storing the capacity and length at the start of the allocation.
This crate is trusted by rustc, so shouldn't have any issues with trusting a new dependency.
Alternatives
Keep as-is which will continue the double indirection, although on the cold path.
Additional context
No response
Related Problem
Box<Vec<Frame>>is double indirection, but is being used here to minimize the inline size so thebox_collectionclippy lint is being silenced.Source:
hash/libs/error-stack/src/report.rs
Line 251 in 958822e
Proposed Solution
The ThinVec crate can be used to remove the double indirection while keeping the single inline pointer size by storing the capacity and length at the start of the allocation.
This crate is trusted by
rustc, so shouldn't have any issues with trusting a new dependency.Alternatives
Keep as-is which will continue the double indirection, although on the cold path.
Additional context
No response