M cmd/docker-credential-himitsu/get.ha => cmd/docker-credential-himitsu/get.ha +1 -1
@@ 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")!;
M cmd/docker-credential-himitsu/list.ha => cmd/docker-credential-himitsu/list.ha +1 -7
@@ 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) {