authorgravatar for hello@nektro.netMeghan <hello@nektro.net> 2020-12-15 06:22:08 -08:00
committergravatar for hello@nektro.netMeghan <hello@nektro.net> 2020-12-15 06:22:08 -08:00
logde31b9db43013ae63d69f3a982dc4f5d8f682bc7
treee4bd4f7939fc104961c8e52eac3e47f3139bb5ae
parentcae43d7a20f0aa287b67ffdc58f07a56a8d90c34

util: move byte sizes to funcs


2 files changed, 5 insertions(+), 5 deletions(-)

src/util/funcs.zig+4
......@@ -6,6 +6,10 @@ const u = @import("index.zig");
66//
77//
88
9pub const b = 1;
10pub const kb = b * 1024;
11pub const mb = kb * 1024;
12
913pub fn print(comptime fmt: []const u8, args: anytype) void {
1014 std.debug.print(fmt++"\n", args);
1115}
src/util/module.zig+1-5
......@@ -7,10 +7,6 @@ const u = @import("index.zig");
77//
88//
99
10const b = 1;
11const kb = b * 1024;
12const mb = kb * 1024;
13
1410pub const Module = struct {
1511 is_sys_lib: bool,
1612 name: []const u8,
......@@ -66,7 +62,7 @@ pub const Module = struct {
6662 const abs_path = try u.concat(&[_][]const u8{cdpath, "/", self.clean_path, "/", item});
6763 const file = try std.fs.openFileAbsolute(abs_path, .{});
6864 defer file.close();
69 const input = try file.reader().readAllAlloc(gpa, mb);
65 const input = try file.reader().readAllAlloc(gpa, u.mb);
7066 h.update(input);
7167 }
7268 var out: [32]u8 = undefined;