From 3ab2fb3c9c09c8019732681446feb63def416c7c Mon Sep 17 00:00:00 2001 From: LORDBABUINO Date: Mon, 11 May 2026 20:17:58 -0300 Subject: [PATCH] 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. --- api/src/main.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/api/src/main.rs b/api/src/main.rs index f27ec13..2559956 100644 --- a/api/src/main.rs +++ b/api/src/main.rs @@ -139,11 +139,6 @@ fn detect_cookie_file(url: &str) -> Option { .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())