Skip to content

Commit 6042aef

Browse files
committed
rt: Convert an old warning to an assert
1 parent 128a8b6 commit 6042aef

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Diff for: src/rt/circular_buffer.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@ circular_buffer::circular_buffer(rust_kernel *kernel, size_t unit_sz) :
2424
circular_buffer::~circular_buffer() {
2525
KLOG(kernel, mem, "~circular_buffer 0x%" PRIxPTR, this);
2626
assert(_buffer);
27-
if (_unread != 0) {
28-
fprintf(stderr, "warning: freeing circular_buffer with"
29-
" %lu unread bytes", _unread);
30-
fflush(stderr);
31-
}
27+
assert(_unread != 0 && "didn't expect bytes in the circular buffer");
3228

3329
kernel->free(_buffer);
3430
}

0 commit comments

Comments
 (0)