You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This lint should suggest to use slices or arrays instead of probably-heap-allocated vecs. But only for short literals. Past a certain length better not to fire this lint.
The text was updated successfully, but these errors were encountered:
What it does
The lint suggests to replace an allocated vec![] with a slice. In test blocks I see lot of vecs that aren't necessary.
Lint Name
use_slice_or_array
Category
perf
Advantage
It's more efficient.
Drawbacks
None, I think.
Example
Could be written as:
This lint should suggest to use slices or arrays instead of probably-heap-allocated vecs. But only for short literals. Past a certain length better not to fire this lint.
The text was updated successfully, but these errors were encountered: