Skip to content

Commit f7b08a1

Browse files
committed
prefer orelse return instead of orelse unreachable
1 parent 6912175 commit f7b08a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/browser/dom/element.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,11 @@ pub const Element = struct {
251251
// None of the following can be null.
252252
const maybe_html = parser.nodeFirstChild(fragment_node);
253253
std.debug.assert(maybe_html != null);
254-
const html = maybe_html.?;
254+
const html = maybe_html orelse return;
255255

256256
const maybe_body = parser.nodeLastChild(html);
257257
std.debug.assert(maybe_body != null);
258-
const body = maybe_body.?;
258+
const body = maybe_body orelse return;
259259

260260
const children = try parser.nodeGetChildNodes(body);
261261

0 commit comments

Comments
 (0)