mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 23:23:28 +00:00
dom: is_wildcard is never changed
This commit is contained in:
@@ -72,7 +72,7 @@ pub const HTMLCollection = struct {
|
|||||||
const imatch = try std.ascii.allocUpperString(allocator, self.match);
|
const imatch = try std.ascii.allocUpperString(allocator, self.match);
|
||||||
defer allocator.free(imatch);
|
defer allocator.free(imatch);
|
||||||
|
|
||||||
var is_wildcard = std.mem.eql(u8, self.match, "*");
|
const is_wildcard = std.mem.eql(u8, self.match, "*");
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
ntype = parser.nodeType(node);
|
ntype = parser.nodeType(node);
|
||||||
@@ -93,7 +93,7 @@ pub const HTMLCollection = struct {
|
|||||||
var node: *parser.Node = self.root;
|
var node: *parser.Node = self.root;
|
||||||
var ntype: parser.NodeType = undefined;
|
var ntype: parser.NodeType = undefined;
|
||||||
|
|
||||||
var is_wildcard = std.mem.eql(u8, self.match, "*");
|
const is_wildcard = std.mem.eql(u8, self.match, "*");
|
||||||
|
|
||||||
// Use the current state to improve speed if possible.
|
// Use the current state to improve speed if possible.
|
||||||
if (self.cur_idx != null and index >= self.cur_idx.?) {
|
if (self.cur_idx != null and index >= self.cur_idx.?) {
|
||||||
@@ -136,7 +136,7 @@ pub const HTMLCollection = struct {
|
|||||||
var node: *parser.Node = self.root;
|
var node: *parser.Node = self.root;
|
||||||
var ntype: parser.NodeType = undefined;
|
var ntype: parser.NodeType = undefined;
|
||||||
|
|
||||||
var is_wildcard = std.mem.eql(u8, self.match, "*");
|
const is_wildcard = std.mem.eql(u8, self.match, "*");
|
||||||
|
|
||||||
const imatch = try std.ascii.allocUpperString(allocator, self.match);
|
const imatch = try std.ascii.allocUpperString(allocator, self.match);
|
||||||
defer allocator.free(imatch);
|
defer allocator.free(imatch);
|
||||||
|
|||||||
Reference in New Issue
Block a user