mirror of
https://github.com/LORDBABUINO/stealth.git
synced 2026-06-09 14:11:52 -07:00
refactor(api): drop dead-code cookie loop in detect_cookie_file
The second loop is unreachable: the first loop returns as soon as it finds an existing candidate. Collapse to a single iterator chain.
This commit is contained in:
@@ -139,11 +139,6 @@ fn detect_cookie_file(url: &str) -> Option<PathBuf> {
|
||||
.map(|(_, port)| port)
|
||||
.unwrap_or(8332);
|
||||
|
||||
for candidate in cookie_candidates(&bitcoin_dir, port) {
|
||||
if candidate.exists() {
|
||||
return Some(candidate);
|
||||
}
|
||||
}
|
||||
cookie_candidates(&bitcoin_dir, port)
|
||||
.into_iter()
|
||||
.find(|candidate| candidate.exists())
|
||||
|
||||
Reference in New Issue
Block a user