improve str_add_assign lint description

This commit is contained in:
llogiq 2016-02-18 20:12:33 +01:00
parent 6a624fe77c
commit 1fd0676fa3

View File

@ -13,9 +13,9 @@ use utils::STRING_PATH;
/// **What it does:** This lint matches code of the form `x = x + y` (without `let`!).
///
/// **Why is this bad?** Because this expression needs another copy as opposed to `x.push_str(y)` (in practice LLVM will usually elide it, though). Despite [llogiq](https://github.com/llogiq)'s reservations, this lint also is `allow` by default, as some people opine that it's more readable.
/// **Why is this bad?** It's not really bad, but some people think that the `.push_str(_)` method is more readable.
///
/// **Known problems:** None. Well apart from the lint being `allow` by default. :smile:
/// **Known problems:** None.
///
/// **Example:**
///