diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-11-27 01:07:35 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-11-29 23:30:38 -0700 |
| commit | ceb0a632cfd6a4eada6bd27bf6a3754e95dcac86 (patch) | |
| tree | 3c174281ab0b9d51b6c78234b0648e197412eea8 /lib/std/pdb.zig | |
| parent | deda6b514691c3a7ffc7931469886d0e7be2f67e (diff) | |
| download | zig-ceb0a632cfd6a4eada6bd27bf6a3754e95dcac86.tar.gz zig-ceb0a632cfd6a4eada6bd27bf6a3754e95dcac86.zip | |
std.mem.Allocator: allow shrink to fail
closes #13535
Diffstat (limited to 'lib/std/pdb.zig')
| -rw-r--r-- | lib/std/pdb.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/pdb.zig b/lib/std/pdb.zig index a60dc1dcea..ab712e2aff 100644 --- a/lib/std/pdb.zig +++ b/lib/std/pdb.zig @@ -478,7 +478,7 @@ fn readSparseBitVector(stream: anytype, allocator: mem.Allocator) ![]u32 { if (bit_i == std.math.maxInt(u5)) break; } } - return list.toOwnedSlice(); + return try list.toOwnedSlice(); } pub const Pdb = struct { @@ -615,8 +615,8 @@ pub const Pdb = struct { return error.InvalidDebugInfo; } - self.modules = modules.toOwnedSlice(); - self.sect_contribs = sect_contribs.toOwnedSlice(); + self.modules = try modules.toOwnedSlice(); + self.sect_contribs = try sect_contribs.toOwnedSlice(); } pub fn parseInfoStream(self: *Pdb) !void { |
