feat: remove toStr methods

This commit is contained in:
utox39
2025-05-30 18:01:00 +02:00
parent 5019f177c1
commit ff810a1656
7 changed files with 9 additions and 97 deletions

View File

@@ -7,20 +7,12 @@ pub const SystemUptime = struct {
days: i8,
hours: i8,
minutes: i8,
pub fn toStr(self: SystemUptime, buf: []u8) ![]u8 {
return std.fmt.bufPrint(buf, "{} days, {} hours, {} minutes", .{ self.days, self.hours, self.minutes });
}
};
/// Struct representing Kernel informations
pub const KernelInfo = struct {
kernel_name: []u8,
kernel_release: []u8,
pub fn toStr(self: KernelInfo, buf: []u8) ![]u8 {
return std.fmt.bufPrint(buf, "{s} {s}", .{ self.kernel_name, self.kernel_release });
}
};
pub fn getHostname(allocator: std.mem.Allocator) ![]u8 {