diff --git a/src/rt/circular_buffer.cpp b/src/rt/circular_buffer.cpp index 58e14412e46..7c5d5848719 100644 --- a/src/rt/circular_buffer.cpp +++ b/src/rt/circular_buffer.cpp @@ -24,11 +24,7 @@ circular_buffer::circular_buffer(rust_kernel *kernel, size_t unit_sz) : circular_buffer::~circular_buffer() { KLOG(kernel, mem, "~circular_buffer 0x%" PRIxPTR, this); assert(_buffer); - if (_unread != 0) { - fprintf(stderr, "warning: freeing circular_buffer with" - " %lu unread bytes", _unread); - fflush(stderr); - } + assert(_unread != 0 && "didn't expect bytes in the circular buffer"); kernel->free(_buffer); }