refactor: create new run function in main using anytype
- change ID
- qszmtxkupkmrnllskxsvownmpsrtlllv
- git commit
- a553c9b0601d125aaf7893b216db5c72307161c6
- author
- Grace Yoder <grace_yoder@outlook.com> - 2026-06-25T11:47:54-06:00
- committer
- Grace Yoder <grace_yoder@outlook.com> - 2026-06-25T16:42:38-06:00
- parents
- tutkzxlsvtqv
- refs
- signature
- Present (not validated)
refactor: create new run function in main using anytype
tree
| type | name | size |
|---|---|---|
| file | .crow/build.yml | 2096 bytes |
| file | .crow/release.yml | 566 bytes |
| file | .gitignore | 354 bytes |
| file | LICENSE | 1073 bytes |
| file | README.md | 632 bytes |
| file | build.zig | 1056 bytes |
| file | build.zig.zon | 247 bytes |
| file | src/Clip/OSC52.zig | 4611 bytes |
| file | src/Clip.zig | 1236 bytes |
| file | src/main.zig | 1462 bytes |
diff
src/main.zig
modified (file → file)
std.process.exit(1);
}
- std.debug.print("\x1b[0;32mCopying the following to Pasteboard\x1b[0m\n", .{});
-
// We want to avoid doing as many allocations as possible so having raw
// pages with it being larger should be totally fine
var clip = try Clip.OSC52.init(std.heap.page_allocator, init.io, std.heap.pageSize());
+ defer clip.free();
+
+ run(io, clip);
+}
+
+pub fn run(io: *std.Io, clip: anytype) !void {
+ std.debug.print("\x1b[0;32mCopying the following to Pasteboard\x1b[0m\n", .{});
var buf: [4096]u8 = undefined;
while (true) {