diff --git a/data/rules/sauce.yml b/data/rules/sauce.yml index e116883..6c8be24 100644 --- a/data/rules/sauce.yml +++ b/data/rules/sauce.yml @@ -27,7 +27,7 @@ rules: (?xi) \b ( - (:?api|ondemand)\.(?:us|eu)-(?:west|east|central)-[0-9]\.saucelabs\.com + (?:api|ondemand)\.(?:us|eu)-(?:west|east|central)-[0-9]\.saucelabs\.com ) \b confidence: medium diff --git a/src/main.rs b/src/main.rs index 6be95c4..bfd16f8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,27 +5,27 @@ // * Fallback - system allocator (`system-alloc` feature) // ──────────────────────────────────────────────────────────── -// // --- jemalloc (opt-in) --- -// #[cfg(feature = "use-jemalloc")] -// #[global_allocator] -// static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; +// --- jemalloc (opt-in) --- +#[cfg(feature = "use-jemalloc")] +#[global_allocator] +static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; -// // --- mimalloc (default) --- -// #[cfg(all(not(feature = "use-jemalloc"), not(feature = "system-alloc")))] -// #[global_allocator] -// static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; - -// // --- system allocator (explicit opt-out) --- -// #[cfg(feature = "system-alloc")] -// use std::alloc::System; -// #[cfg(feature = "system-alloc")] -// #[global_allocator] -// static GLOBAL: System = System; +// --- mimalloc (default) --- +#[cfg(all(not(feature = "use-jemalloc"), not(feature = "system-alloc")))] +#[global_allocator] +static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; +// --- system allocator (explicit opt-out) --- +#[cfg(feature = "system-alloc")] use std::alloc::System; +#[cfg(feature = "system-alloc")] #[global_allocator] static GLOBAL: System = System; +// use std::alloc::System; +// #[global_allocator] +// static GLOBAL: System = System; + use std::{ io::Read, sync::{Arc, Mutex}, diff --git a/src/validation/mongodb.rs b/src/validation/mongodb.rs index 19185b6..bb3da23 100644 --- a/src/validation/mongodb.rs +++ b/src/validation/mongodb.rs @@ -94,8 +94,8 @@ fn is_local_host(h: &str) -> bool { const FAST_CONNECT_MS: u64 = 700; // direct single-host URIs const FAST_SELECT_MS: u64 = 300; const SRV_PARSE_MS: u64 = 2_000; // limit DNS resolution time -const SRV_CONNECT_MS: u64 = 2500; //700; -const SRV_SELECT_MS: u64 = 2500; //300; +const SRV_CONNECT_MS: u64 = 2500; +const SRV_SELECT_MS: u64 = 2500; /// Validates a MongoDB URI in ≤ 2 s. Returns `(bool, String)` where the /// boolean indicates success and the string provides a status message.