]> git.lizzy.rs Git - rust.git/commitdiff
Remove mention of `.push_str(s)` being faster
authorPhil Turnbull <philip.turnbull@gmail.com>
Sun, 20 Nov 2016 16:22:22 +0000 (11:22 -0500)
committerPhil Turnbull <philip.turnbull@gmail.com>
Sun, 20 Nov 2016 22:28:14 +0000 (17:28 -0500)
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

index d1192e3f26bc67cac3f6b9a173b926c37e3d7b1d..2d600300448a16935e6ba02f093fc2d7e528eed3 100644 (file)
 /// **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.
 ///