From 63b6754ba602db4643717888f2e9b9b2ae8e1895 Mon Sep 17 00:00:00 2001 From: Pinghao Wu Date: Wed, 24 Jul 2024 10:22:54 +0800 Subject: [PATCH] update for himitsu 0.8 --- cmd/docker-credential-himitsu/get.ha | 2 +- cmd/docker-credential-himitsu/list.ha | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/cmd/docker-credential-himitsu/get.ha b/cmd/docker-credential-himitsu/get.ha index 3ebdf80..a54f30c 100644 --- a/cmd/docker-credential-himitsu/get.ha +++ b/cmd/docker-credential-himitsu/get.ha @@ -24,7 +24,7 @@ fn get(hi: net::socket) void = { const json = json::newobject(); defer json::finish(json); const query = match (client::next(&iter)!) { - case void => + case done => // see go github.com/docker/docker-credential-helpers/client // client.go fmt::println("credentials not found in native keychain")!; diff --git a/cmd/docker-credential-himitsu/list.ha b/cmd/docker-credential-himitsu/list.ha index 7c39be0..943ecb8 100644 --- a/cmd/docker-credential-himitsu/list.ha +++ b/cmd/docker-credential-himitsu/list.ha @@ -18,13 +18,7 @@ fn list(hi: net::socket) void = { const iter = client::query(hi, client::operation::QUERY, &query, 0)!; const json = json::newobject(); defer json::finish(json); - for (true) { - const query = match (client::next(&iter)!) { - case void => - break; - case let q: query::query => - yield q; - }; + for (const query => client::next(&iter)!) { defer query::finish(&query); let hosti = 0z, usernamei = 0z; for (let i = 0z; i < len(query.items); i += 1) { -- 2.45.2