clean up std.Buffer.print

master
Andrew Kelley 2020-02-24 22:34:06 -05:00
parent 6fa143355f
commit 7cfe854359
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
1 changed files with 1 additions and 7 deletions

View File

@ -149,13 +149,7 @@ pub const Buffer = struct {
}
pub fn print(self: *Buffer, comptime fmt: []const u8, args: var) !void {
try std.fmt.format(
self,
@typeInfo(@TypeOf(Buffer.append)).Fn.return_type.?.ErrorSet,
Buffer.append,
fmt,
args,
);
return std.fmt.format(self, error{OutOfMemory}, Buffer.append, fmt, args);
}
};