Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2141: feat(types) Avoid allocating a `Vec` when calling `FunctionType::new` r=syrusakbary a=Hywan # Description Sequel of #2036. We can go further by defining `Params` and `Results` of `FunctionType::new` as `Into<Box<[Type]>>` directly rather than `Into<Vec<Type>>`. It simplifies the code: `params.into()` rather than `params.into().into_boxed_slice()`. I assume it doesn't allocate an intermediate vector. Since `From<Box<[T]>>` is implemented for `Vec<T>`, I reckon it's not a BC break. # Review - [ ] ~Add a short description of the the change to the CHANGELOG.md file~ not necessary Co-authored-by: Ivan Enderlin <[email protected]>
- Loading branch information