File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ pub const ArenaAllocator = struct {
214
214
215
215
const cur_node = self .state .buffer_list .first orelse return false ;
216
216
const cur_buf = @as ([* ]u8 , @ptrCast (cur_node ))[@sizeOf (BufNode ).. cur_node .data ];
217
- if (@intFromPtr ( cur_buf .ptr ) + self .state .end_index != @intFromPtr ( buf .ptr ) + buf .len ) {
217
+ if (cur_buf .ptr + self .state .end_index != buf .ptr + buf .len ) {
218
218
// It's not the most recent allocation, so it cannot be expanded,
219
219
// but it's fine if they want to make it smaller.
220
220
return new_len <= buf .len ;
@@ -240,7 +240,7 @@ pub const ArenaAllocator = struct {
240
240
const cur_node = self .state .buffer_list .first orelse return ;
241
241
const cur_buf = @as ([* ]u8 , @ptrCast (cur_node ))[@sizeOf (BufNode ).. cur_node .data ];
242
242
243
- if (@intFromPtr ( cur_buf .ptr ) + self .state .end_index == @intFromPtr ( buf .ptr ) + buf .len ) {
243
+ if (cur_buf .ptr + self .state .end_index == buf .ptr + buf .len ) {
244
244
self .state .end_index -= buf .len ;
245
245
}
246
246
}
You can’t perform that action at this time.
0 commit comments