aboutsummaryrefslogtreecommitdiff
path: root/std/heap.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-01-07 16:51:46 -0500
committerAndrew Kelley <superjoe30@gmail.com>2018-01-07 16:53:13 -0500
commit66717db735b9ddac9298bf08fcf95e7e11629fee (patch)
tree54dea549c62d851da9269b09eba8e596450ee330 /std/heap.zig
parentde1f57926f212f18a98884fa8b1d0df7f7bc7f03 (diff)
downloadzig-66717db735b9ddac9298bf08fcf95e7e11629fee.tar.gz
zig-66717db735b9ddac9298bf08fcf95e7e11629fee.zip
replace `%return` with `try`
See #632 better fits the convention of using keywords for control flow
Diffstat (limited to 'std/heap.zig')
-rw-r--r--std/heap.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/std/heap.zig b/std/heap.zig
index e1e46deb40..fb39a9c2b8 100644
--- a/std/heap.zig
+++ b/std/heap.zig
@@ -124,7 +124,7 @@ pub const IncrementingAllocator = struct {
if (new_size <= old_mem.len) {
return old_mem[0..new_size];
} else {
- const result = %return alloc(allocator, new_size, alignment);
+ const result = try alloc(allocator, new_size, alignment);
mem.copy(u8, result, old_mem);
return result;
}