Fix examples: main, pathological, table.
This commit is contained in:
parent
4e3a53c536
commit
019669d2f0
3 changed files with 4 additions and 4 deletions
|
@ -15,7 +15,7 @@ pub fn main() !void {
|
|||
const alloc = gpa.allocator();
|
||||
|
||||
// Initialize Vaxis
|
||||
var vx = try vaxis.init(.{});
|
||||
var vx = try vaxis.init(alloc, .{});
|
||||
defer vx.deinit(alloc);
|
||||
|
||||
var loop: vaxis.Loop(Event) = .{ .vaxis = &vx };
|
||||
|
|
|
@ -11,7 +11,7 @@ const Event = union(enum) {
|
|||
pub fn main() !void {
|
||||
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
|
||||
const alloc = gpa.allocator();
|
||||
var vx = try vaxis.init(.{});
|
||||
var vx = try vaxis.init(alloc, .{});
|
||||
errdefer vx.deinit(alloc);
|
||||
|
||||
var loop: vaxis.Loop(Event) = .{ .vaxis = &vx };
|
||||
|
|
|
@ -25,7 +25,7 @@ pub fn main() !void {
|
|||
const user_list = std.ArrayList(User).fromOwnedSlice(alloc, users_buf);
|
||||
defer user_list.deinit();
|
||||
|
||||
var vx = try vaxis.init(.{});
|
||||
var vx = try vaxis.init(alloc, .{});
|
||||
defer vx.deinit(alloc);
|
||||
|
||||
var loop: vaxis.Loop(union(enum) {
|
||||
|
@ -57,7 +57,7 @@ pub fn main() !void {
|
|||
};
|
||||
var title_segs = [_]vaxis.Cell.Segment{ title_logo, title_info, title_disclaimer };
|
||||
|
||||
var cmd_input = vaxis.widgets.TextInput.init(alloc);
|
||||
var cmd_input = vaxis.widgets.TextInput.init(alloc, &vx.unicode);
|
||||
defer cmd_input.deinit();
|
||||
|
||||
// Colors
|
||||
|
|
Loading…
Reference in a new issue