mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 07:31:47 +00:00
better null check syntax
Co-authored-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
@@ -831,13 +831,13 @@ pub inline fn domImplementationCreateDocument(namespace: ?[:0]const u8, qname: ?
|
||||
var doc: ?*Document = undefined;
|
||||
|
||||
var ptrnamespace: [*c]const u8 = null;
|
||||
if (namespace != null) {
|
||||
ptrnamespace = namespace.?.ptr;
|
||||
if (namespace) |ns| {
|
||||
ptrnamespace = ns.ptr;
|
||||
}
|
||||
|
||||
var ptrqname: [*c]const u8 = null;
|
||||
if (qname != null) {
|
||||
ptrqname = qname.?.ptr;
|
||||
if (qname) |qn| {
|
||||
ptrqname = qn.ptr;
|
||||
}
|
||||
|
||||
_ = c.dom_implementation_create_document(
|
||||
|
||||
Reference in New Issue
Block a user