deps: drop regex, toml, indexmap - std-only minirx, toml_lite, inferred IndexMap

This commit is contained in:
Loki 2026-10-15 12:53:22 +02:00
parent 59637e50dc
commit d19e4f784d
Signed by: boba
GPG key ID: 253067914055423B
19 changed files with 1171 additions and 96 deletions

View file

@ -7,7 +7,6 @@ rust-version.workspace = true
license.workspace = true
[dependencies]
regex = { workspace = true }
serde = { workspace = true }
noxis-analysis = { workspace = true }
noxis-classfile = { workspace = true }

View file

@ -57,15 +57,13 @@ pub fn find_leaks(before: &BTreeSet<String>, after: &Program, keep: &KeepRules)
pub fn check_patterns(text: &str) -> Vec<&'static str> {
use std::sync::OnceLock;
static COMPILED: OnceLock<Vec<(&'static str, regex::Regex)>> = OnceLock::new();
use noxis_analysis::minirx::Regex;
static COMPILED: OnceLock<Vec<(&'static str, Regex)>> = OnceLock::new();
let compiled = COMPILED.get_or_init(|| {
RED_PATTERNS
.iter()
.filter_map(|pattern| {
regex::Regex::new(pattern)
.ok()
.map(|regex| (*pattern, regex))
})
.filter_map(|pattern| Regex::new(pattern).ok().map(|regex| (*pattern, regex)))
.collect()
});
compiled