summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2024-07-19 20:57:10 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2024-07-19 20:57:10 +0200
commitbb163d731dbea91246b3882a0ba09f9b6db9ea8a (patch)
tree165d2bd3e02377e7dbba166edbf7c7769f68df07 /src
parent5d391ac3c3bf0ffc02e5f6eae00db949810346b3 (diff)
downloaduf-bb163d731dbea91246b3882a0ba09f9b6db9ea8a.tar.gz
uf-bb163d731dbea91246b3882a0ba09f9b6db9ea8a.tar.bz2
uf-bb163d731dbea91246b3882a0ba09f9b6db9ea8a.zip
chore: Clean up repository
Remove some unused file and add missing one.
Diffstat (limited to 'src')
-rw-r--r--src/main.zig10
-rw-r--r--src/root.zig10
2 files changed, 5 insertions, 15 deletions
diff --git a/src/main.zig b/src/main.zig
index c65a36b..14eb65c 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -18,16 +18,16 @@ const Uf = struct {
var out_buf: [buf_size]u8 = undefined;
var out_index: u32 = 0;
- fn init() *const Self {
- return &Self{};
+ fn init() Self {
+ return Self{};
}
- fn flush(_: *const Self, out: Writer) !void {
+ fn flush(_: Self, out: Writer) !void {
_ = try out.write(out_buf[0..out_index]);
out_index = 0;
}
- fn writeChar(self: *const Self, out: Writer, c: u8) !void {
+ fn writeChar(self: Self, out: Writer, c: u8) !void {
if (out_index >= buf_size) {
try self.flush(out);
}
@@ -35,7 +35,7 @@ const Uf = struct {
out_index += 1;
}
- fn streamCopy(self: *const Self, in: File, out: File) !void {
+ fn streamCopy(self: Self, in: File, out: File) !void {
const reader = in.reader();
const writer = out.writer();
diff --git a/src/root.zig b/src/root.zig
deleted file mode 100644
index ecfeade..0000000
--- a/src/root.zig
+++ /dev/null
@@ -1,10 +0,0 @@
-const std = @import("std");
-const testing = std.testing;
-
-export fn add(a: i32, b: i32) i32 {
- return a + b;
-}
-
-test "basic add functionality" {
- try testing.expect(add(3, 7) == 10);
-}