Change @return! syntax to require ":" after faults. Update all contracts to consistently use ":" before the description.

This commit is contained in:
Christoffer Lerno
2025-03-05 17:11:45 +01:00
parent cf0405930e
commit c0b80eccad
67 changed files with 645 additions and 637 deletions

View File

@@ -520,7 +520,7 @@ fn String BigInt.to_string(&self, Allocator allocator) @dynamic
}
<*
@require radix > 1 && radix <= 36 "Radix must be 2-36"
@require radix > 1 && radix <= 36 : "Radix must be 2-36"
*>
fn String BigInt.to_string_with_radix(&self, int radix, Allocator allocator)
{
@@ -562,7 +562,7 @@ fn String BigInt.to_string_with_radix(&self, int radix, Allocator allocator)
}
<*
@require !exp.is_negative() "Positive exponents only"
@require !exp.is_negative() : "Positive exponents only"
*>
fn BigInt BigInt.mod_pow(&self, BigInt exp, BigInt mod)
{
@@ -846,7 +846,7 @@ fn BigInt BigInt.lcm(&self, BigInt other)
}
<*
@require bits >> 5 < MAX_LEN "Required bits > maxlength"
@require bits >> 5 < MAX_LEN : "Required bits > maxlength"
*>
fn void BigInt.randomize_bits(&self, Random random, int bits)
{