Auto merge of #3706 - robamler:patch-1, r=phansch
Fix documentation for `slow_vector_initialization` This PR fixes the documentation for the lint `slow_vector_initialization`. The documentation recommended writing `vec![len; 0]` but the correct solution is `vec![0; len]`.
This commit is contained in:
commit
62f40e28b9
@ -11,8 +11,8 @@ use syntax_pos::symbol::Symbol;
|
||||
|
||||
/// **What it does:** Checks slow zero-filled vector initialization
|
||||
///
|
||||
/// **Why is this bad?** This structures are non-idiomatic and less efficient than simply using
|
||||
/// `vec![len; 0]`.
|
||||
/// **Why is this bad?** These structures are non-idiomatic and less efficient than simply using
|
||||
/// `vec![0; len]`.
|
||||
///
|
||||
/// **Known problems:** None.
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user