From 14e27f567a59ee31bf5250e0b839e25f3730ea5e Mon Sep 17 00:00:00 2001 From: Robert Bamler Date: Sat, 26 Jan 2019 20:26:38 -0800 Subject: [PATCH] Fix documentation for `slow_vector_initialization` Change the recommended solution from `vec![len; 0]` to `vec![0; len]`. Also fix grammar. --- clippy_lints/src/slow_vector_initialization.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/slow_vector_initialization.rs b/clippy_lints/src/slow_vector_initialization.rs index aea414065d8..936e62396dc 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. ///