mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13:28 +00:00
dom: improve code style
This commit is contained in:
@@ -37,14 +37,12 @@ pub const HTMLCollection = struct {
|
||||
// https://dom.spec.whatwg.org/#concept-tree-order
|
||||
fn get_next(root: *parser.Node, cur: *parser.Node) ?*parser.Node {
|
||||
// TODO deinit next
|
||||
var next = parser.nodeFirstChild(cur);
|
||||
if (next != null) {
|
||||
if (parser.nodeFirstChild(cur)) |next| {
|
||||
return next;
|
||||
}
|
||||
|
||||
// TODO deinit next
|
||||
next = parser.nodeNextSibling(cur);
|
||||
if (next != null) {
|
||||
if (parser.nodeNextSibling(cur)) |next| {
|
||||
return next;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user