From 027b8616d34cdfa83347b18242e34465af99421d Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Fri, 13 Jun 2025 16:49:40 -0700 Subject: [PATCH] Refactor while loop to not repeat instruction --- spec/unixstreamsrvr.moon | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/unixstreamsrvr.moon b/spec/unixstreamsrvr.moon index 133b581..b0ffd8a 100644 --- a/spec/unixstreamsrvr.moon +++ b/spec/unixstreamsrvr.moon @@ -8,7 +8,7 @@ assert u\listen! assert u\settimeout 1 c = assert u\accept! -m = assert c\receive! -while m != "" - print m +while true m = assert c\receive! + break if m == "" + print m