summaryrefslogtreecommitdiff
path: root/src/cmd/date.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/date.zig')
-rw-r--r--src/cmd/date.zig8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/cmd/date.zig b/src/cmd/date.zig
index 3a7d72b..5f6aee6 100644
--- a/src/cmd/date.zig
+++ b/src/cmd/date.zig
@@ -1,6 +1,5 @@
const std = @import("std");
const Allocator = std.mem.Allocator;
-const print = std.debug.print;
const types = @import("./lib/types.zig");
const CommandStatus = types.CommandStatus;
@@ -56,11 +55,8 @@ pub const Date = struct {
const output = try std.fmt.allocPrint(ctx.allocator, "Current date is {d:0>2}/{d:0>2}/{d}\n", .{ month, day, year });
defer ctx.allocator.free(output);
- if (ctx.output_capture) |capture| {
- try capture.write(output);
- } else {
- print("{s}", .{output});
- }
+ var writer = ctx.output_writer;
+ try writer.write(output);
return CommandStatus{ .Code = 0 };
}
};