commit 546650055c9ee84b467ebafadee45c36322b1e12
parent 858e98e6a733b11c7befea2690cbe5952886de10
Author: Sebastian LaVine <mail@smlavine.com>
Date: Sun, 17 Dec 2023 22:41:27 -0500
strings: Further simplify sub
Building off the work done in 55fcd75, let's remove the r variable that
we don't need anymore.
Signed-off-by: Sebastian LaVine <mail@smlavine.com>
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/strings/sub.ha b/strings/sub.ha
@@ -7,9 +7,9 @@ export type end = void;
fn utf8_byte_len_bounded(iter: *iterator, end: size) size = {
for (let i = 0z; i < end; i += 1) {
- let r = match (next(iter)) {
+ match (next(iter)) {
case let r: rune =>
- yield r;
+ continue;
case void =>
abort("index exceeds string length");
};