mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
Change @return! syntax to require ":" after faults. Update all contracts to consistently use ":" before the description.
This commit is contained in:
@@ -14,7 +14,7 @@ struct ByteBuffer (InStream, OutStream)
|
||||
<*
|
||||
ByteBuffer provides a streamable read/write buffer.
|
||||
max_read defines how many bytes might be kept before its internal buffer is shrinked.
|
||||
@require self.bytes.len == 0 "Buffer already initialized."
|
||||
@require self.bytes.len == 0 : "Buffer already initialized."
|
||||
*>
|
||||
fn ByteBuffer* ByteBuffer.init(&self, Allocator allocator, usz max_read, usz initial_capacity = 16)
|
||||
{
|
||||
@@ -31,7 +31,7 @@ fn ByteBuffer* ByteBuffer.tinit(&self, usz max_read, usz initial_capacity = 16)
|
||||
|
||||
<*
|
||||
@require buf.len > 0
|
||||
@require self.bytes.len == 0 "Buffer already initialized."
|
||||
@require self.bytes.len == 0 : "Buffer already initialized."
|
||||
*>
|
||||
fn ByteBuffer* ByteBuffer.init_with_buffer(&self, char[] buf)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user