@@ -37,7 +37,6 @@ pub fn processMessage(cmd: anytype) !void {
3737 .performSearch = > return performSearch (cmd ),
3838 .getSearchResults = > return getSearchResults (cmd ),
3939 .discardSearchResults = > return discardSearchResults (cmd ),
40-
4140 }
4241}
4342
@@ -181,8 +180,8 @@ pub const NodeSearchList = std.ArrayList(NodeSearch);
181180// https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-performSearch
182181fn performSearch (cmd : anytype ) ! void {
183182 const params = (try cmd .params (struct {
184- query : []const u8 ,
185- includeUserAgentShadowDOM : ? bool = null ,
183+ query : []const u8 ,
184+ includeUserAgentShadowDOM : ? bool = null ,
186185 })) orelse return error .InvalidParams ;
187186
188187 // retrieve the root node
@@ -210,7 +209,7 @@ fn performSearch(cmd: anytype) !void {
210209// https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-discardSearchResults
211210fn discardSearchResults (cmd : anytype ) ! void {
212211 const params = (try cmd .params (struct {
213- searchId : []const u8 ,
212+ searchId : []const u8 ,
214213 })) orelse return error .InvalidParams ;
215214
216215 var state = cmd .cdp ;
@@ -256,7 +255,5 @@ fn getSearchResults(cmd: anytype) !void {
256255 if (params .fromIndex >= items .len ) return error .BadFromIndex ;
257256 if (params .toIndex > items .len ) return error .BadToIndex ;
258257
259- return cmd .sendResult (.{
260- .nodeIds = ns .? .coll .items [params .fromIndex .. params .toIndex ]
261- }, .{});
258+ return cmd .sendResult (.{ .nodeIds = ns .? .coll .items [params .fromIndex .. params .toIndex ] }, .{});
262259}
0 commit comments