fix: simplify closure in filter_map for better readability
This commit is contained in:
+1
-1
@@ -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
@@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user