refactor: zigify imports and usages
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user