From 022220699319df0f6aac922e09bb9bbc7518b77d Mon Sep 17 00:00:00 2001 From: Armin Preiml Date: Tue, 25 Jun 2024 12:34:21 +0200 Subject: [PATCH] net::ssh: update stdlib changes --- net/ssh/client.ha | 2 +- net/ssh/proto.ha | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/net/ssh/client.ha b/net/ssh/client.ha index 3d20982..e288460 100644 --- a/net/ssh/client.ha +++ b/net/ssh/client.ha @@ -160,7 +160,7 @@ fn client_verexch(client: *client) (void | error) = { fn toknext(tok: *strings::tokenizer) (str | protoerror) = { match (strings::next_token(tok)) { - case void => + case done => return protoerror; case let token: str => return token; diff --git a/net/ssh/proto.ha b/net/ssh/proto.ha index 8e0d3ab..5a22a4c 100644 --- a/net/ssh/proto.ha +++ b/net/ssh/proto.ha @@ -88,13 +88,8 @@ fn readnamelist(src: *memio::stream) ([]str | protoerror) = { const list = readstr(src)?; const tok = strings::tokenize(list, ","); let items: []str = []; - for (true) { - match (strings::next_token(&tok)) { - case void => - break; - case let item: str => - append(items, item); - }; + for (let item => strings::next_token(&tok)) { + append(items, item); }; return items; }; -- 2.45.2