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:
bors 2019-01-27 13:34:47 +00:00
commit 62f40e28b9

View File

@ -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.
///