Fix typo in examples.

This commit is contained in:
Boyu Yang 2018-09-13 11:51:58 +08:00
parent 1128505fdd
commit 60e8da1647
No known key found for this signature in database
GPG Key ID: 8541EBA40EF41840

View File

@ -342,11 +342,11 @@ 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
@ -354,7 +354,7 @@ declare_clippy_lint! {
/// ```
/// or
/// ```rust
/// foo.unwrap_or_else(|_| panic!(format("Err {}: {}", err_code, err_msg).as_str()))
/// foo.unwrap_or_else(|_| panic!(format!("Err {}: {}", err_code, err_msg).as_str()))
/// ```
declare_clippy_lint! {
pub EXPECT_FUN_CALL,