diff options
| author | bors <bors@rust-lang.org> | 2019-01-27 13:34:47 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-01-27 13:34:47 +0000 |
| commit | 62f40e28b9b4e44d683ca2508b1bd9e637d2df38 (patch) | |
| tree | 237dff896856b7dd85e1d69997b1dc6bfe75832f | |
| parent | 13421e3945a28dad49226c4d08986eaacd1033d9 (diff) | |
| parent | 14e27f567a59ee31bf5250e0b839e25f3730ea5e (diff) | |
| download | rust-62f40e28b9b4e44d683ca2508b1bd9e637d2df38.tar.gz rust-62f40e28b9b4e44d683ca2508b1bd9e637d2df38.zip | |
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]`.
| -rw-r--r-- | clippy_lints/src/slow_vector_initialization.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/slow_vector_initialization.rs b/clippy_lints/src/slow_vector_initialization.rs index 4ce9ce3e2ff..1f9f369cfe4 100644 --- a/clippy_lints/src/slow_vector_initialization.rs +++ b/clippy_lints/src/slow_vector_initialization.rs @@ -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. /// |
