Use orelse

Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
This commit is contained in:
Francis Bouvier
2023-09-29 13:39:41 +02:00
parent e59309e392
commit bbcd9d8dcf

View File

@@ -131,8 +131,7 @@ pub const Node = struct {
} }
pub fn _cloneNode(self: *parser.Node, deep: ?bool) Union { pub fn _cloneNode(self: *parser.Node, deep: ?bool) Union {
const is_deep = if (deep) |deep_set| deep_set else false; const clone = parser.nodeCloneNode(self, deep orelse false);
const clone = parser.nodeCloneNode(self, is_deep);
return Node.toInterface(clone); return Node.toInterface(clone);
} }