Skip to content

Commit a3d6753

Browse files
authored
Merge pull request #154 from gHashTag/feat/issue-151
fix(monitor): replace catch unreachable with try in eternal_monitor.zig init
2 parents 7c150b8 + 1b7aaed commit a3d6753

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/tri/eternal_monitor.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ pub const EternalMonitor = struct {
132132
const monitor = try allocator.create(EternalMonitor);
133133
monitor.allocator = allocator;
134134
monitor.config = config;
135-
monitor.components = std.ArrayList(SystemComponent).initCapacity(allocator, 16) catch unreachable;
136-
monitor.alerts = std.ArrayList(Alert).initCapacity(allocator, 64) catch unreachable;
135+
monitor.components = try std.ArrayList(SystemComponent).initCapacity(allocator, 16);
136+
monitor.alerts = try std.ArrayList(Alert).initCapacity(allocator, 64);
137137
monitor.metrics = .{};
138138
monitor.start_time_ms = timestamp_ms();
139139
monitor.running = true;

0 commit comments

Comments
 (0)