Skip to content

Commit

Permalink
refactor(semantic): fix dead code warning in release mode (#5728)
Browse files Browse the repository at this point in the history
`Counts::assert_accurate` is only used in debug mode. Silence the dead code warning in release mode.
  • Loading branch information
overlookmotel committed Sep 12, 2024
1 parent 3ce8546 commit 6436524
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/oxc_semantic/src/counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl Counts {
counts
}

#[cfg(debug_assertions)]
#[cfg_attr(not(debug_assertions), expect(dead_code))]
pub fn assert_accurate(actual: &Self, estimated: &Self) {
assert_eq!(actual.nodes, estimated.nodes, "nodes count mismatch");
assert_eq!(actual.scopes, estimated.scopes, "scopes count mismatch");
Expand Down

0 comments on commit 6436524

Please sign in to comment.