Skip to content

Commit 5c5f2a8

Browse files
author
mikerite
authored
Merge pull request #3169 from yangby-cryptape/fix-typo-in-examples
Fix typo in examples.
2 parents 1128505 + 4827ab9 commit 5c5f2a8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

clippy_lints/src/methods.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -342,20 +342,16 @@ declare_clippy_lint! {
342342
///
343343
/// **Example:**
344344
/// ```rust
345-
/// foo.expect(&format("Err {}: {}", err_code, err_msg))
345+
/// foo.expect(&format!("Err {}: {}", err_code, err_msg))
346346
/// ```
347347
/// or
348348
/// ```rust
349-
/// foo.expect(format("Err {}: {}", err_code, err_msg).as_str())
349+
/// foo.expect(format!("Err {}: {}", err_code, err_msg).as_str())
350350
/// ```
351351
/// this can instead be written:
352352
/// ```rust
353353
/// foo.unwrap_or_else(|_| panic!("Err {}: {}", err_code, err_msg))
354354
/// ```
355-
/// or
356-
/// ```rust
357-
/// foo.unwrap_or_else(|_| panic!(format("Err {}: {}", err_code, err_msg).as_str()))
358-
/// ```
359355
declare_clippy_lint! {
360356
pub EXPECT_FUN_CALL,
361357
perf,

0 commit comments

Comments
 (0)