mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
Fix typo in examples.
This commit is contained in:
parent
1128505fdd
commit
60e8da1647
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user