refactor: replace unsafe unreachable usage with @panic
This commit is contained in:
parent
2d1fb680e8
commit
4b86579745
7 changed files with 17 additions and 15 deletions
|
@ -966,7 +966,7 @@ pub fn load(self: *const Self, reader: anytype, size: usize) !Root {
|
|||
return error.BufferUnderrun;
|
||||
const final_read = try reader.read(buf);
|
||||
if (final_read != 0)
|
||||
unreachable;
|
||||
@panic("unexpected data in final read");
|
||||
|
||||
var leaf_count: usize = 1;
|
||||
for (0..buf.len) |i| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue