slow_vector_initialization should catch capacity call #8800
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-negative
Issue: The lint should have been triggered on code, but wasn't
Summary
Call to capacity is DRY approach to fill pre-allocated vector and should be treated the same way as explicit length
Lint Name
slow_vector_initialization
Reproducer
I tried this code:
I expected to see this happen:
Instead, this happened:
No warning
Version
The text was updated successfully, but these errors were encountered: