Merge commit 'ff0993c5e9162ddaea78e83d0f0161e68bd4ea73' into clippy

This commit is contained in:
Lzu Tao
2020-06-09 14:36:01 +00:00
parent 161474b7f7
commit 8db24840f7
143 changed files with 3965 additions and 936 deletions

View File

@@ -24,6 +24,10 @@ declare_clippy_lint! {
/// ```rust
/// let mut x = "Hello".to_owned();
/// x = x + ", World";
///
/// // More readable
/// x += ", World";
/// x.push_str(", World");
/// ```
pub STRING_ADD_ASSIGN,
pedantic,
@@ -69,7 +73,11 @@ declare_clippy_lint! {
///
/// **Example:**
/// ```rust
/// // Bad
/// let bs = "a byte string".as_bytes();
///
/// // Good
/// let bs = b"a byte string";
/// ```
pub STRING_LIT_AS_BYTES,
style,