~sircmpwn/public-inbox

himitsu-totp: all: update fmt::fatal usage v1 APPLIED

Eyal Sawady: 1
 all: update fmt::fatal usage

 1 files changed, 3 insertions(+), 3 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/public-inbox/patches/32142/mbox | git am -3
Learn more about email & git

[PATCH himitsu-totp] all: update fmt::fatal usage Export this patch

---
 cmd/hitotp/main.ha | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cmd/hitotp/main.ha b/cmd/hitotp/main.ha
index 708b1f9..df4068e 100644
--- a/cmd/hitotp/main.ha
+++ b/cmd/hitotp/main.ha
@@ -29,7 +29,7 @@ fn parse_uri(q: []str, u: str) void = {
	match (uri.host) {
	case let host: str =>
		if (host != "totp") {
			fmt::fatal("Error: unsupported URL type {}", host);
			fmt::fatal("Error: unsupported URL type", host);
		};
	case =>
		fmt::fatal("Error: unsupported URL type");
@@ -121,7 +121,7 @@ export fn main() void = {
	case let line: []u8 =>
		yield strings::fromutf8(line);
	case let err: io::error =>
		fmt::fatal("I/O error: {}", io::strerror(err));
		fmt::fatal("I/O error:", io::strerror(err));
	case io::EOF =>
		fmt::fatal("Error: no matching keys");
	};
@@ -134,7 +134,7 @@ export fn main() void = {
		defer query::finish(&query);
		fmt::printfln("{:06}", do_totp(&query))!;
	case "error" =>
		fmt::fatal("Himitsu error: {}", resp.1);
		fmt::fatal("Himitsu error:", resp.1);
	case => yield;
	};
};
-- 
2.36.0
Thanks!

To git@git.sr.ht:~sircmpwn/himitsu-totp
   30ab3c3..0c2de08  master -> master