const -> var to aid assignments

This commit is contained in:
Emil Lerch 2023-04-06 13:34:44 -07:00
parent b07c75ca9a
commit 8c9df71080
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -509,11 +509,11 @@ fn getNewDimensions(width: usize, height: usize, desired_width: usize, desired_h
test "gets correct bytes" {
const bg_file: [:0]u8 = @constCast("logo:");
const opts = .{ .background_filename = bg_file, .device_file = "-" };
const empty: [:0]u8 = @constCast("");
var empty: [:0]u8 = @constCast("");
for (&lines) |*line| {
line.* = ∅
}
const line: [:0]u8 = @constCast("Hello\\!");
var line: [:0]u8 = @constCast("Hello\\!");
lines[5] = &line;
var pixels: [display.WIDTH * display.HEIGHT]u8 = undefined;