hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 37b047234afcc8f9a7d9372f4cba4744c69474c7
parent ece74311fdef4309dac57ec61cf9b9272b4e2361
Author: Sebastian <sebastian@sebsite.pw>
Date:   Thu, 31 Aug 2023 02:11:47 -0400

Remove some unnecessary casts

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mbytes/tokenize.ha | 2+-
Mregex/regex.ha | 2+-
Mtime/chrono/tzdb.ha | 2+-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bytes/tokenize.ha b/bytes/tokenize.ha @@ -155,7 +155,7 @@ export fn remaining_tokens(s: *tokenizer) []u8 = { assert(equal(peek_token(&t) as []u8, [2, 3, 4])); assert(equal(remaining_tokens(&t), [2, 3, 4])); - t = tokenize([]: []u8, [42]); + t = tokenize([], [42]); assert(peek_token(&t) is void); assert(next_token(&t) is void); diff --git a/regex/regex.ha b/regex/regex.ha @@ -714,7 +714,7 @@ fn search( const matchlen = threads[i].root_capture.end - threads[i].root_capture.start; if (res is newmatch && matchlen > 0 && !need_captures) { - return []: []capture; + return []; }; const is_better = res is newmatch && matchlen > 0 && (first_match_idx is void diff --git a/time/chrono/tzdb.ha b/time/chrono/tzdb.ha @@ -66,7 +66,7 @@ fn load_tzif(h: io::handle, tz: *timezone) (void | invalidtzif | io::error) = { // test for magic "TZif" mustread(h, buf4)?; - if (!bytes::equal(buf4, ['T': u8, 'Z': u8, 'i': u8, 'f': u8])) { + if (!bytes::equal(buf4, ['T', 'Z', 'i', 'f'])) { return invalidtzif; };