add crate::HashMap and crate::HashSet

This commit is contained in:
monosans
2025-08-13 07:46:28 +03:00
parent 325ffe769e
commit 7fb0851efd
7 changed files with 12 additions and 10 deletions
+3 -2
View File
@@ -6,9 +6,10 @@ use std::{
};
use color_eyre::eyre::{OptionExt as _, WrapErr as _};
use foldhash::HashMap;
use crate::{http::BasicAuth, proxy::ProxyType, raw_config, utils::is_docker};
use crate::{
HashMap, http::BasicAuth, proxy::ProxyType, raw_config, utils::is_docker,
};
pub const APP_DIRECTORY_NAME: &str = "proxy_scraper_checker";
+1 -3
View File
@@ -5,9 +5,7 @@ use std::{
time::{Duration, SystemTime},
};
use foldhash::HashMap;
use crate::config::Config;
use crate::{HashMap, config::Config};
const DEFAULT_MAX_RETRIES: u32 = 2;
const INITIAL_RETRY_DELAY: Duration = Duration::from_millis(500);
+3
View File
@@ -80,6 +80,9 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
type Error = color_eyre::Report;
type Result<T> = color_eyre::Result<T>;
type HashMap<K, V> = foldhash::HashMap<K, V>;
type HashSet<T> = foldhash::HashSet<T>;
fn create_logging_filter(
config: &config::Config,
) -> tracing_subscriber::filter::Targets {
+1 -1
View File
@@ -6,9 +6,9 @@ use std::{
};
use color_eyre::eyre::WrapErr as _;
use foldhash::HashMap;
use crate::{
HashMap,
config::Config,
ipdb,
proxy::{Proxy, ProxyType},
+1 -2
View File
@@ -5,10 +5,9 @@ use std::{
};
use color_eyre::eyre::WrapErr as _;
use foldhash::HashMap;
use serde::Deserialize as _;
use crate::http::BasicAuth;
use crate::{HashMap, http::BasicAuth};
fn validate_positive_f64<'de, D: serde::Deserializer<'de>>(
deserializer: D,
+2 -1
View File
@@ -1,11 +1,12 @@
use std::sync::Arc;
use color_eyre::eyre::{OptionExt as _, WrapErr as _};
use foldhash::{HashSet, HashSetExt as _};
use foldhash::HashSetExt as _;
#[cfg(feature = "tui")]
use crate::event::{AppEvent, Event};
use crate::{
HashSet,
config::{Config, Source},
http,
parsers::PROXY_REGEX,
+1 -1
View File
@@ -10,7 +10,6 @@ use color_eyre::eyre::WrapErr as _;
use crossterm::event::{
Event as CrosstermEvent, KeyCode, KeyModifiers, MouseEventKind,
};
use foldhash::HashMap;
use futures::StreamExt as _;
use ratatui::{
Frame,
@@ -22,6 +21,7 @@ use ratatui::{
use tui_logger::{TuiLoggerWidget, TuiWidgetEvent, TuiWidgetState};
use crate::{
HashMap,
event::{AppEvent, Event},
ipdb,
proxy::ProxyType,