From bf94b097c4134b9ceaf983984f71b688e36274a4 Mon Sep 17 00:00:00 2001 From: Komari Spaghetti Date: Sat, 9 Oct 2021 13:06:28 +0200 Subject: Fix uses of builtin --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 646c052..197eb4c 100644 --- a/README.md +++ b/README.md @@ -53,13 +53,13 @@ pub fn main() !void { defer args.deinit(); if (args.flag("--help")) - debug.warn("--help\n", .{}); + debug.print("--help\n", .{}); if (args.option("--number")) |n| - debug.warn("--number = {s}\n", .{n}); + debug.print("--number = {s}\n", .{n}); for (args.options("--string")) |s| - debug.warn("--string = {s}\n", .{s}); + debug.print("--string = {s}\n", .{s}); for (args.positionals()) |pos| - debug.warn("{s}\n", .{pos}); + debug.print("{s}\n", .{pos}); } ``` @@ -153,13 +153,13 @@ pub fn main() !void { }) |arg| { // arg.param will point to the parameter which matched the argument. switch (arg.param.id) { - 'h' => debug.warn("Help!\n", .{}), - 'n' => debug.warn("--number = {s}\n", .{arg.value.?}), + 'h' => debug.print("Help!\n", .{}), + 'n' => debug.print("--number = {s}\n", .{arg.value.?}), // arg.value == null, if arg.param.takes_value == .none. // Otherwise, arg.value is the value passed with the argument, such as "-a=10" // or "-a 10". - 'f' => debug.warn("{s}\n", .{arg.value.?}), + 'f' => debug.print("{s}\n", .{arg.value.?}), else => unreachable, } } -- cgit v1.2.3