Skip to content

Commit 14e27f5

Browse files
authored
Fix documentation for slow_vector_initialization
Change the recommended solution from `vec![len; 0]` to `vec![0; len]`. Also fix grammar.
1 parent e3270c6 commit 14e27f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/slow_vector_initialization.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ use syntax_pos::symbol::Symbol;
1111

1212
/// **What it does:** Checks slow zero-filled vector initialization
1313
///
14-
/// **Why is this bad?** This structures are non-idiomatic and less efficient than simply using
15-
/// `vec![len; 0]`.
14+
/// **Why is this bad?** These structures are non-idiomatic and less efficient than simply using
15+
/// `vec![0; len]`.
1616
///
1717
/// **Known problems:** None.
1818
///

0 commit comments

Comments
 (0)