Skip to content

fix(needle): catch unreachable → try in hnsw.zig, vsa.zig, autonomous_refactor.zig #274

@gHashTag

Description

@gHashTag

Bug

Three needle files have catch unreachable on allocator operations:

  1. src/needle/hnsw.zig line 121:
new_node.layers.append(self.allocator, std.ArrayList(usize).empty) catch unreachable;
  1. src/needle/vsa.zig line 541:
pointers.append(v) catch unreachable;
  1. src/needle/autonomous_refactor.zig line 489:
result.append(std.heap.page_allocator, std.ascii.toLower(c)) catch unreachable;

Fix

Replace all with try. Ensure containing functions return error unions.

Files

  • src/needle/hnsw.zig — 1 catch unreachable
  • src/needle/vsa.zig — 1 catch unreachable
  • src/needle/autonomous_refactor.zig — 1 catch unreachable

Verification

  • zig build compiles clean

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