From b3a6faf13ebccb82bb5fa82012bb62699a8ff6fb Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 23 Jan 2018 23:08:09 -0500 Subject: replace %defer with errdefer See #632 now we have 1 less sigil --- std/io.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'std/io.zig') diff --git a/std/io.zig b/std/io.zig index cfde7c6013..fd8bb80984 100644 --- a/std/io.zig +++ b/std/io.zig @@ -550,7 +550,7 @@ pub fn readFileAllocExtra(path: []const u8, allocator: &mem.Allocator, extra_len const size = try file.getEndPos(); const buf = try allocator.alloc(u8, size + extra_len); - %defer allocator.free(buf); + errdefer allocator.free(buf); var adapter = FileInStream.init(&file); try adapter.stream.readNoEof(buf[0..size]); -- cgit v1.2.3