refactor: zigify imports and usages

This commit is contained in:
2025-05-26 14:23:18 +02:00
parent 4cde0640c8
commit 80a36a9947
13 changed files with 33 additions and 21 deletions

View File

@@ -194,7 +194,7 @@ pub fn Scrollable(Event: type) type {
fn content(ctx: *anyopaque, cells: []Cell, size: Point) !void {
const this: *@This() = @ptrCast(@alignCast(ctx));
std.debug.assert(cells.len == @as(usize, this.size.x) * @as(usize, this.size.y));
assert(cells.len == @as(usize, this.size.x) * @as(usize, this.size.y));
const offset_x: usize = if (this.configuration.x_axis) 1 else 0;
const offset_y: usize = if (this.configuration.y_axis) 1 else 0;

View File

@@ -181,8 +181,8 @@ pub fn expectEqualCells(origin: Point, size: Point, expected: []const Cell, actu
// test failed
try buffer.flush();
std.debug.lockStdErr();
defer std.debug.unlockStdErr();
debug.lockStdErr();
defer debug.unlockStdErr();
const std_writer = std.io.getStdErr().writer();
try std_writer.writeAll(output.items);
@@ -190,6 +190,7 @@ pub fn expectEqualCells(origin: Point, size: Point, expected: []const Cell, actu
}
const std = @import("std");
const debug = std.debug;
const testing = std.testing;
const Allocator = std.mem.Allocator;
const event = @import("event.zig");