more robust bdz for numbers + helpers
This commit is contained in:
@@ -119,10 +119,7 @@ pub const ShellWriter = struct {
|
||||
if (res.found_existing) {
|
||||
res.value_ptr.* += 1;
|
||||
} else {
|
||||
// TODO(motiejus): can we avoid `ourShell` variable here?
|
||||
const ourShell = try self.allocator.alloc(u8, shell.len);
|
||||
std.mem.copy(u8, ourShell, shell);
|
||||
res.key_ptr.* = ourShell;
|
||||
res.key_ptr.* = try self.allocator.dupe(u8, shell);
|
||||
res.value_ptr.* = 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user