fix: simplify closure in filter_map for better readability

This commit is contained in:
monosans
2025-12-25 13:28:09 +03:00
parent a3ce923a14
commit 59b7245507
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -147,7 +147,7 @@ impl Config {
]
.into_iter()
.filter_map(|(proxy_type, section)| {
section.enabled.then(move || {
section.enabled.then(|| {
(
proxy_type,
section
+1 -1
View File
@@ -189,7 +189,7 @@ const CONFIG_ENV: &str = "PROXY_SCRAPER_CHECKER_CONFIG";
pub fn get_config_path() -> compact_str::CompactString {
env::var(CONFIG_ENV).map_or_else(
move |_| compact_str::CompactString::const_new("config.toml"),
|_| compact_str::CompactString::const_new("config.toml"),
Into::into,
)
}