mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 17:18:32 +03:00
rt: Convert an old warning to an assert
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user