Skip to content

Commit 17b2ba5

Browse files
committed
Syntax-highlight single_char_push_str lint
1 parent c88c614 commit 17b2ba5

File tree

1 file changed

+5
-5
lines changed
  • clippy_lints/src/methods

1 file changed

+5
-5
lines changed

clippy_lints/src/methods/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,20 +1324,20 @@ declare_clippy_lint! {
13241324
}
13251325

13261326
declare_clippy_lint! {
1327-
/// **What it does:** Warns when using push_str with a single-character string literal,
1328-
/// and push with a char would work fine.
1327+
/// **What it does:** Warns when using `push_str` with a single-character string literal,
1328+
/// and `push` with a `char` would work fine.
13291329
///
1330-
/// **Why is this bad?** It's less clear that we are pushing a single character
1330+
/// **Why is this bad?** It's less clear that we are pushing a single character.
13311331
///
13321332
/// **Known problems:** None
13331333
///
13341334
/// **Example:**
1335-
/// ```
1335+
/// ```rust
13361336
/// let mut string = String::new();
13371337
/// string.push_str("R");
13381338
/// ```
13391339
/// Could be written as
1340-
/// ```
1340+
/// ```rust
13411341
/// let mut string = String::new();
13421342
/// string.push('R');
13431343
/// ```

0 commit comments

Comments
 (0)