mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
refactor(semantic): remove more-asserts dependency (#5739)
Remove `more-asserts` dependency which was added in #5710. As suggested by @Boshen in https://github.com/oxc-project/oxc/pull/5710#pullrequestreview-2299016692.
This commit is contained in:
parent
333e2e04c4
commit
7dfcdfced6
4 changed files with 6 additions and 12 deletions
7
Cargo.lock
generated
7
Cargo.lock
generated
|
|
@ -1232,12 +1232,6 @@ dependencies = [
|
||||||
"windows-sys 0.52.0",
|
"windows-sys 0.52.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "more-asserts"
|
|
||||||
version = "0.3.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1fafa6961cabd9c63bcd77a45d7e3b7f3b552b70417831fb0f56db717e72407e"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "napi"
|
name = "napi"
|
||||||
version = "3.0.0-alpha.8"
|
version = "3.0.0-alpha.8"
|
||||||
|
|
@ -1858,7 +1852,6 @@ dependencies = [
|
||||||
"indexmap",
|
"indexmap",
|
||||||
"insta",
|
"insta",
|
||||||
"itertools",
|
"itertools",
|
||||||
"more-asserts",
|
|
||||||
"oxc_allocator",
|
"oxc_allocator",
|
||||||
"oxc_ast",
|
"oxc_ast",
|
||||||
"oxc_cfg",
|
"oxc_cfg",
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,6 @@ memoffset = "0.9.1"
|
||||||
miette = { version = "7.2.0", features = ["fancy-no-syscall"] }
|
miette = { version = "7.2.0", features = ["fancy-no-syscall"] }
|
||||||
mimalloc = "0.1.43"
|
mimalloc = "0.1.43"
|
||||||
mime_guess = "2.0.5"
|
mime_guess = "2.0.5"
|
||||||
more-asserts = "0.3.1"
|
|
||||||
nonmax = "0.5.5"
|
nonmax = "0.5.5"
|
||||||
num-bigint = "0.4.6"
|
num-bigint = "0.4.6"
|
||||||
num-traits = "0.2.19"
|
num-traits = "0.2.19"
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ oxc_syntax = { workspace = true }
|
||||||
assert-unchecked = { workspace = true }
|
assert-unchecked = { workspace = true }
|
||||||
indexmap = { workspace = true }
|
indexmap = { workspace = true }
|
||||||
itertools = { workspace = true }
|
itertools = { workspace = true }
|
||||||
more-asserts = { workspace = true }
|
|
||||||
phf = { workspace = true, features = ["macros"] }
|
phf = { workspace = true, features = ["macros"] }
|
||||||
rustc-hash = { workspace = true }
|
rustc-hash = { workspace = true }
|
||||||
serde = { workspace = true, features = ["derive"], optional = true }
|
serde = { workspace = true, features = ["derive"], optional = true }
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,6 @@
|
||||||
|
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
|
|
||||||
use more_asserts::assert_le;
|
|
||||||
|
|
||||||
use oxc_ast::{
|
use oxc_ast::{
|
||||||
ast::{
|
ast::{
|
||||||
BindingIdentifier, IdentifierReference, Program, TSEnumMemberName, TSModuleDeclarationName,
|
BindingIdentifier, IdentifierReference, Program, TSEnumMemberName, TSModuleDeclarationName,
|
||||||
|
|
@ -41,7 +39,12 @@ impl Counts {
|
||||||
// This is not a big problem - allocating a `Vec` with excess capacity is cheap.
|
// This is not a big problem - allocating a `Vec` with excess capacity is cheap.
|
||||||
// It's allocating with *not enough* capacity which is costly, as then the `Vec`
|
// It's allocating with *not enough* capacity which is costly, as then the `Vec`
|
||||||
// will grow and reallocate.
|
// will grow and reallocate.
|
||||||
assert_le!(actual.symbols, estimated.symbols, "symbols count mismatch");
|
assert!(
|
||||||
|
actual.symbols <= estimated.symbols,
|
||||||
|
"symbols count mismatch {} <= {}",
|
||||||
|
actual.symbols,
|
||||||
|
estimated.symbols
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue