Skip to content

fix(serve): replace catch unreachable with try in tri_serve.zig init #156

@gHashTag

Description

@gHashTag

Task

In src/tri/tri_serve.zig line 96, ArrayList initialization uses catch unreachable:

.protocols_active = std.ArrayList([]const u8).initCapacity(allocator, 0) catch unreachable,

Allocation can fail. Use try instead.

Fix

.protocols_active = try std.ArrayList([]const u8).initCapacity(allocator, 0),

Ensure the enclosing function returns an error union if needed.

File

  • src/tri/tri_serve.zig — line 96

Acceptance

  • zig build compiles without errors
  • zig fmt passes
  • No catch unreachable on ArrayList init

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:spawnAuto-spawn agent container

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions