mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-28 22:53:28 +00:00
prefer orelse return instead of orelse unreachable
This commit is contained in:
@@ -251,11 +251,11 @@ pub const Element = struct {
|
|||||||
// None of the following can be null.
|
// None of the following can be null.
|
||||||
const maybe_html = parser.nodeFirstChild(fragment_node);
|
const maybe_html = parser.nodeFirstChild(fragment_node);
|
||||||
std.debug.assert(maybe_html != null);
|
std.debug.assert(maybe_html != null);
|
||||||
const html = maybe_html.?;
|
const html = maybe_html orelse return;
|
||||||
|
|
||||||
const maybe_body = parser.nodeLastChild(html);
|
const maybe_body = parser.nodeLastChild(html);
|
||||||
std.debug.assert(maybe_body != null);
|
std.debug.assert(maybe_body != null);
|
||||||
const body = maybe_body.?;
|
const body = maybe_body orelse return;
|
||||||
|
|
||||||
const children = try parser.nodeGetChildNodes(body);
|
const children = try parser.nodeGetChildNodes(body);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user