From f1089e384cb5ef1ea81ecab6ab3eba6c399ff575 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 29 Jul 2022 22:09:40 -0700 Subject: [PATCH] Ignore assertions_on_result_states clippy lint error: called `assert!` with `Result::is_err` --> tests/test_stmt.rs:48:5 | 48 | assert!(syn::parse_str::("let _ = &raw x;").is_err()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `syn::parse_str::("let _ = &raw x;").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 error: called `assert!` with `Result::is_err` --> tests/test_derive_input.rs:396:5 | 396 | assert!(input.attrs[0].parse_meta().is_err()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `input.attrs[0].parse_meta().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 error: called `assert!` with `Result::is_err` --> tests/test_derive_input.rs:432:5 | 432 | assert!(input.attrs[0].parse_meta().is_err()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `input.attrs[0].parse_meta().unwrap_err()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states --- tests/test_derive_input.rs | 2 +- tests/test_stmt.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_derive_input.rs b/tests/test_derive_input.rs index 93634e5772..1eff01186a 100644 --- a/tests/test_derive_input.rs +++ b/tests/test_derive_input.rs @@ -1,4 +1,4 @@ -#![allow(clippy::too_many_lines)] +#![allow(clippy::assertions_on_result_states, clippy::too_many_lines)] #[macro_use] mod macros; diff --git a/tests/test_stmt.rs b/tests/test_stmt.rs index 0bca62b048..f444e5b49e 100644 --- a/tests/test_stmt.rs +++ b/tests/test_stmt.rs @@ -1,4 +1,4 @@ -#![allow(clippy::non_ascii_literal)] +#![allow(clippy::assertions_on_result_states, clippy::non_ascii_literal)] #[macro_use] mod macros;