std.mem.Allocator: allow shrink to fail

closes #13535
This commit is contained in:
Andrew Kelley
2022-11-27 01:07:35 -07:00
parent deda6b5146
commit ceb0a632cf
57 changed files with 950 additions and 1279 deletions

View File

@@ -72,8 +72,8 @@ pub fn parse(gpa: Allocator, source: [:0]const u8) Allocator.Error!Ast {
.source = source,
.tokens = tokens.toOwnedSlice(),
.nodes = parser.nodes.toOwnedSlice(),
.extra_data = parser.extra_data.toOwnedSlice(gpa),
.errors = parser.errors.toOwnedSlice(gpa),
.extra_data = try parser.extra_data.toOwnedSlice(gpa),
.errors = try parser.errors.toOwnedSlice(gpa),
};
}