Skip to content

Commit f77d571

Browse files
committed
test: fix clippy warnings
``` error: this assertion has a constant value --> crates/build-rs-test-lib/src/lib.rs:3:5 | 3 | assert!(cfg!(did_run_build_script)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider moving this into a const block: `const { assert!(..) }` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#assertions_on_constants = note: `-D clippy::assertions-on-constants` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::assertions_on_constants)]` ``` A bit annoying we can't have `lint.workspace = true` for this crate yet
1 parent 6775d31 commit f77d571

File tree

1 file changed

+1
-1
lines changed
  • crates/build-rs-test-lib/src

1 file changed

+1
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#[test]
22
fn test() {
3-
assert!(cfg!(did_run_build_script));
3+
const { assert!(cfg!(did_run_build_script)) };
44
}

0 commit comments

Comments
 (0)