Uniformize calling name conventions

Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
Francis Bouvier
2024-06-19 15:56:44 +02:00
parent 0f8b47b598
commit aca64eedca
9 changed files with 38 additions and 39 deletions

View File

@@ -9,7 +9,7 @@ const result = cdp.result;
const getMsg = cdp.getMsg;
const stringify = cdp.stringify;
const RuntimeMethods = enum {
const Methods = enum {
enable,
runIfWaitingForDebugger,
evaluate,
@@ -24,7 +24,7 @@ pub fn runtime(
scanner: *std.json.Scanner,
ctx: *Ctx,
) ![]const u8 {
const method = std.meta.stringToEnum(RuntimeMethods, action) orelse
const method = std.meta.stringToEnum(Methods, action) orelse
return error.UnknownMethod;
return switch (method) {
.enable => enable(alloc, id, scanner, ctx),