From 8705f3d11cbbb2237f84a4da6c070a1fa76f8d48 Mon Sep 17 00:00:00 2001 From: Phil Turnbull Date: Sun, 20 Nov 2016 11:22:22 -0500 Subject: [PATCH] Remove mention of `.push_str(s)` being faster For the `.push_str(str.chars())` case the compiler will inline `push_str` and call `extend_from_slice` on the underlying vector, so this isn't actually faster. --- clippy_lints/src/methods.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/methods.rs b/clippy_lints/src/methods.rs index d1192e3f26bc..2d600300448a 100644 --- a/clippy_lints/src/methods.rs +++ b/clippy_lints/src/methods.rs @@ -493,7 +493,7 @@ declare_lint! { /// **What it does:** Checks for the use of `.extend(s.chars())` where s is a /// `&str` or `String`. /// -/// **Why is this bad?** `.push_str(s)` is clearer and faster +/// **Why is this bad?** `.push_str(s)` is clearer /// /// **Known problems:** None. ///