Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove 1 level of indirection via &Vec -> &[T]
Typically `&Vec<T>` isn't something you want when you need a read-only view over a Vec, because it adds another level of indirection: Vec already stores a pointer to heap-allocated buffer internally. Using slices `&[T]` removes such unnecessary level of indirection and is considered a cleaner design. It is cache friendlier and can be better optimized by the compiler (not that it should matters in this case).
- Loading branch information