From 2e1f7c95ce4766463a46102a95f830c82239b740 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Thu, 21 Aug 2025 01:46:41 +0200 Subject: [PATCH] Cleanup. --- lib/std/collections/bitset.c3 | 6 ++++++ lib/std/core/string.c3 | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/std/collections/bitset.c3 b/lib/std/collections/bitset.c3 index 4d91721c5..9e4ea88ca 100644 --- a/lib/std/collections/bitset.c3 +++ b/lib/std/collections/bitset.c3 @@ -136,6 +136,7 @@ fn void BitSet.unset(&self, usz i) @param i : "The index of the bit" @require i < SIZE : "Index was out of range" + @pure *> fn bool BitSet.get(&self, usz i) @operator([]) @inline { @@ -144,6 +145,11 @@ fn bool BitSet.get(&self, usz i) @operator([]) @inline return self.data[q] & (1 << r) != 0; } +<* + Return the number of bits. + + @pure +*> fn usz BitSet.len(&self) @operator(len) @inline { return SZ * BITS; diff --git a/lib/std/core/string.c3 b/lib/std/core/string.c3 index d43be093f..4724c5569 100644 --- a/lib/std/core/string.c3 +++ b/lib/std/core/string.c3 @@ -138,7 +138,7 @@ fn String tformat(String fmt, args...) @format(0) Check if a character is in a set. @param c : `the character to check` - @param [in] set : `The formatting string` + @param [in] set : `String containing the characters` @pure @return `True if a character is in the set` *>