Merge commit 'ff0993c5e9162ddaea78e83d0f0161e68bd4ea73' into clippy
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user