From 5d1e17c598829576a0d05042b40c728ef5a8140c Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Wed, 10 Sep 2025 11:29:08 +0200 Subject: [PATCH] cdp: use for...else instead of found bool --- src/cdp/domains/dom.zig | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/cdp/domains/dom.zig b/src/cdp/domains/dom.zig index fdb5dd13..035918e8 100644 --- a/src/cdp/domains/dom.zig +++ b/src/cdp/domains/dom.zig @@ -277,15 +277,12 @@ fn resolveNode(cmd: anytype) !void { var js_context = page.main_context; if (params.executionContextId) |context_id| { if (js_context.v8_context.debugContextId() != context_id) { - var found = false; for (bc.isolated_worlds.items) |*isolated_world| { js_context = &(isolated_world.executor.js_context orelse return error.ContextNotFound); if (js_context.v8_context.debugContextId() == context_id) { - found = true; break; } - } - if (!found) return error.ContextNotFound; + } else return error.ContextNotFound; } }