Skip to content

Commit

Permalink
Ignore unnecessary_cast clippy lint in test
Browse files Browse the repository at this point in the history
    warning: casting integer literal to `u8` is unnecessary
       --> tests/test_ensure.rs:634:30
        |
    634 |     let test = || Ok(ensure!(0 as int!(...) != 0));
        |                              ^^^^^^^^^^^^^^ help: try: `0_u8`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
        = note: `#[warn(clippy::unnecessary_cast)]` on by default

    warning: casting integer literal to `u8` is unnecessary
       --> tests/test_ensure.rs:637:30
        |
    637 |     let test = || Ok(ensure!(0 as int![...] != 0));
        |                              ^^^^^^^^^^^^^^ help: try: `0_u8`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    warning: casting integer literal to `u8` is unnecessary
       --> tests/test_ensure.rs:640:30
        |
    640 |     let test = || Ok(ensure!(0 as int! {...} != 0));
        |                              ^^^^^^^^^^^^^^^ help: try: `0_u8`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
  • Loading branch information
dtolnay committed May 17, 2024
1 parent 4802253 commit c952393
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/test_ensure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
clippy::redundant_pattern_matching,
clippy::too_many_lines,
clippy::unit_arg,
clippy::unnecessary_cast,
clippy::while_immutable_condition,
clippy::zero_ptr,
irrefutable_let_patterns
Expand Down

0 comments on commit c952393

Please sign in to comment.