Skip to content

Commit c1b2f48

Browse files
committed
refactor(napi/oxlint): prevent lint warning in release mode (#12408)
1 parent 11cad7d commit c1b2f48

File tree

1 file changed

+4
-1
lines changed
  • crates/oxc_allocator/src

1 file changed

+4
-1
lines changed

crates/oxc_allocator/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,11 @@ mod pool_fixed_size;
8080
target_endian = "little"
8181
))]
8282
use pool_fixed_size as pool;
83-
// Import here so `generated/assert_layouts.rs` can access it
83+
// Import here so `generated/assert_layouts.rs` can access it.
84+
// Add `debug_assertions` here because `assert_layouts` is only loaded in debug mode,
85+
// so this is required to avoid unused vars lint warning in release mode.
8486
#[cfg(all(
87+
debug_assertions,
8588
feature = "fixed_size",
8689
not(feature = "disable_fixed_size"),
8790
target_pointer_width = "64",

0 commit comments

Comments
 (0)