Skip to content

Commit 5d1e17c

Browse files
committed
cdp: use for...else instead of found bool
1 parent 94fe34b commit 5d1e17c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/cdp/domains/dom.zig

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,15 +277,12 @@ fn resolveNode(cmd: anytype) !void {
277277
var js_context = page.main_context;
278278
if (params.executionContextId) |context_id| {
279279
if (js_context.v8_context.debugContextId() != context_id) {
280-
var found = false;
281280
for (bc.isolated_worlds.items) |*isolated_world| {
282281
js_context = &(isolated_world.executor.js_context orelse return error.ContextNotFound);
283282
if (js_context.v8_context.debugContextId() == context_id) {
284-
found = true;
285283
break;
286284
}
287-
}
288-
if (!found) return error.ContextNotFound;
285+
} else return error.ContextNotFound;
289286
}
290287
}
291288

0 commit comments

Comments
 (0)