Skip to content

Commit

Permalink
Merge pull request #3169 from yangby-cryptape/fix-typo-in-examples
Browse files Browse the repository at this point in the history
Fix typo in examples.
  • Loading branch information
mikerite authored Sep 13, 2018
2 parents 1128505 + 4827ab9 commit 5c5f2a8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions clippy_lints/src/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,20 +342,16 @@ declare_clippy_lint! {
///
/// **Example:**
/// ```rust
/// foo.expect(&format("Err {}: {}", err_code, err_msg))
/// foo.expect(&format!("Err {}: {}", err_code, err_msg))
/// ```
/// or
/// ```rust
/// foo.expect(format("Err {}: {}", err_code, err_msg).as_str())
/// foo.expect(format!("Err {}: {}", err_code, err_msg).as_str())
/// ```
/// this can instead be written:
/// ```rust
/// foo.unwrap_or_else(|_| panic!("Err {}: {}", err_code, err_msg))
/// ```
/// or
/// ```rust
/// foo.unwrap_or_else(|_| panic!(format("Err {}: {}", err_code, err_msg).as_str()))
/// ```
declare_clippy_lint! {
pub EXPECT_FUN_CALL,
perf,
Expand Down

0 comments on commit 5c5f2a8

Please sign in to comment.