ft. #424 @bolshoytoster
these macros are essentially wrappers around the associated functions SmallVec::from and SmallVec::from_buf.
rust policy with macros, as written on the rust book, is simple: don't make a macro out of which can be made as a function
thus they seem very redundant
their origins trace to Vec API parity and a hack that had to be placed in 2021 in order to please the CTFE
conceptually:
smallvec![1u8, 2, 3] ~= SmallVec::from([1u8, 2, 3]);
smallvec_inline![1u8, 2, 3] ~= SmallVec::from_buf([1u8, 2, 3]);
alternatives
- keep the macros as they are now
- redesign the
smallvec_inline! macro to be a wrapper of ::from_buf as smallvec! is of ::from
- remove the macros and accept that their only reason of being was
Vec API parity
ft. #424 @bolshoytoster
these macros are essentially wrappers around the associated functions
SmallVec::fromandSmallVec::from_buf.rust policy with macros, as written on the rust book, is simple: don't make a macro out of which can be made as a function
thus they seem very redundant
their origins trace to
VecAPI parity and a hack that had to be placed in 2021 in order to please the CTFEconceptually:
alternatives
smallvec_inline!macro to be a wrapper of::from_bufassmallvec!is of::fromVecAPI parity