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
I think we should enhance and rename box_vec to box_collection. We can include all collection types like HashMap. String fits if you think about it as a Vec<u8>, which it actually is.
What it does
Check for usage for
Box<String>
in struct definition and function parameter.Categories (optional)
Perf, Warn
What is the advantage of the recommended code over the original code
String
already allocates on heap,Box<String>
allocates a pointer on heap.Similar lints:
rc_buffer
,box_vec
,redundant_allocation
,Drawbacks
None.
Example
Could be written as:
The text was updated successfully, but these errors were encountered: