Skip to content

Commit

Permalink
Resolve default_trait_access clippy lint in PR 158
Browse files Browse the repository at this point in the history
    error: calling `anyhow::Chain::default()` is more clear than this expression
      --> tests/test_chain.rs:54:24
       |
    54 |     let mut c: Chain = Default::default();
       |                        ^^^^^^^^^^^^^^^^^^ help: try: `anyhow::Chain::default()`
       |
       = note: `-D clippy::default-trait-access` implied by `-D clippy::pedantic`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access
  • Loading branch information
dtolnay committed Jul 3, 2021
1 parent f01f908 commit 88f25d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fn test_len() {

#[test]
fn test_default() {
let mut c: Chain = Default::default();
let mut c = Chain::default();
assert!(c.next().is_none());
}

Expand Down

0 comments on commit 88f25d8

Please sign in to comment.