heavens-net/src/hncore/Workspace.zig

40 lines
656 B
Zig

const std = @import("std");
const CommandHistory = @import("./CommandHistory.zig");
const TaskStore = @import("./TaskStore.zig");
///
const Self = @This();
///
const Perma = struct {
tasks: TaskStore,
};
///
commands: CommandHistory,
///
perma: Perma,
///
pub fn init(allocator: std.mem.Allocator) Self {
return Self {
.commands = CommandHistory.init(allocator),
.perma = .{
.tasks = TaskStore.init(allocator),
},
};
}
///
pub fn deinit(self: *Self) void {
self.perma.tasks.deinit();
self.commands.deinit();
}
test {
var ws = init(std.testing.allocator);
defer ws.deinit();
}