Skip to content

Commit

Permalink
Ignore assertions_on_result_states clippy lint
Browse files Browse the repository at this point in the history
    error: called `assert!` with `Result::is_ok`
      --> tests/test_macros.rs:29:5
       |
    29 |     assert!(f().is_ok());
       |     ^^^^^^^^^^^^^^^^^^^^ help: replace with: `f().unwrap()`
       |
       = note: `-D clippy::assertions-on-result-states` implied by `-D clippy::all`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states

    error: called `assert!` with `Result::is_ok`
      --> tests/test_macros.rs:36:5
       |
    36 |     assert!(f().is_ok());
       |     ^^^^^^^^^^^^^^^^^^^^ help: replace with: `f().unwrap()`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states

    error: called `assert!` with `Result::is_err`
      --> tests/test_macros.rs:42:5
       |
    42 |     assert!(f().is_err());
       |     ^^^^^^^^^^^^^^^^^^^^^ help: replace with: `f().unwrap_err()`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states

    error: called `assert!` with `Result::is_err`
       --> tests/test_downcast.rs:122:5
        |
    122 |     assert!(error.downcast::<&str>().is_err());
        |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `error.downcast::<&str>().unwrap_err()`
        |
        = note: `-D clippy::assertions-on-result-states` implied by `-D clippy::all`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
  • Loading branch information
dtolnay committed Jul 30, 2022
1 parent b594668 commit c0e7854
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_downcast.rs
@@ -1,4 +1,4 @@
#![allow(clippy::wildcard_imports)]
#![allow(clippy::assertions_on_result_states, clippy::wildcard_imports)]

mod common;
mod drop;
Expand Down
1 change: 1 addition & 0 deletions tests/test_macros.rs
@@ -1,4 +1,5 @@
#![allow(
clippy::assertions_on_result_states,
clippy::eq_op,
clippy::items_after_statements,
clippy::needless_pass_by_value,
Expand Down

0 comments on commit c0e7854

Please sign in to comment.