authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2019-05-06 21:42:52+02:00
committergravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2019-05-07 11:47:23+02:00
loga3beda27fc9093b6d4d5538104d2704590d7cf2b
treeb6f71ee173b59866912097986e7abda5c5717efc
parent939ec878a00803502f2e07347c09fa6736c5f44a

Add missing cast to usize


2 files changed, 2 insertions(+), 2 deletions(-)

std/io.zig+1-1
......@@ -290,7 +290,7 @@ pub fn readFileAllocAligned(allocator: *mem.Allocator, path: []const u8, comptim
290290 var file = try File.openRead(path);
291291 defer file.close();
292292
293 const size = try file.getEndPos();
293 const size = try math.cast(usize, try file.getEndPos());
294294 const buf = try allocator.alignedAlloc(u8, A, size);
295295 errdefer allocator.free(buf);
296296
std/zig/render.zig+1-1
......@@ -748,7 +748,7 @@ fn renderExpression(
748748 counting_stream.bytes_written = 0;
749749 var dummy_col: usize = 0;
750750 try renderExpression(allocator, &counting_stream.stream, tree, 0, &dummy_col, expr.*, Space.None);
751 const width = counting_stream.bytes_written;
751 const width = @intCast(usize, counting_stream.bytes_written);
752752 const col = i % row_size;
753753 column_widths[col] = std.math.max(column_widths[col], width);
754754 expr_widths[i] = width;