Skip to content

Commit 583939e

Browse files
committed
codegen: Ignore clippy::assert_is_empty lint
``` error: used `assert!` to check that a value is not empty --> tools/codegen/src/lib.rs:54:13 | 54 | assert!(!bin.as_slice().is_empty()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assert_is_empty = note: `-D clippy::assert-is-empty` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::assert_is_empty)]` help: use `assert_ne!` to show the value on failure | 54 - assert!(!bin.as_slice().is_empty()); 54 + assert_ne!(bin.as_slice(), []); | ```
1 parent 6c6fd71 commit 583939e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎Cargo.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ transmute_undefined_repr = "warn"
2828
undocumented_unsafe_blocks = "warn"
2929
unused_trait_names = "warn"
3030
# Suppress buggy or noisy clippy lints
31+
assert_is_empty = { level = "allow", priority = 1 } # completely useless in assert_ne case
3132
bool_assert_comparison = { level = "allow", priority = 1 }
3233
borrow_as_ptr = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/8286
3334
cast_lossless = { level = "allow", priority = 1 } # suggested code has poor codegen with -C opt-level=0 https://godbolt.org/z/GzTxzbd9q

0 commit comments

Comments
 (0)