╭ changed ────────────╮ │src/event/Comment.zig│ ╰─────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │145 var arena = std.heap.ArenaAllocator.init(allocator); │ │146 defer arena.deinit(); │ │147 │ │148 - const DB = evt.EventDB(repo_opts.hash); │ │149 - var event_db_maybe: ?evt.LocalEventDB(repo_opts.hash) = if (repo_kind == .git) try evt.LocalEventDB(repo_opts.hash).openReadOnly(io, allocator, repo.core.repo_dir) else null; │ │150 - defer if (event_db_maybe) |*event_db| event_db.deinit(io, allocator); │ │151 - const moment = (if (event_db_maybe) |*event_db| │ │152 - evt.currentMomentFromDb(repo_opts.hash, event_db.db) │ │153 - else if (repo_kind == .git) │ │154 - return error.NotFound │ │155 - else │ │156 - evt.currentMoment(repo_opts, repo)) catch return error.NotFound; │ │157 - const comment = (try readById(DB, repo_opts.hash, moment, &arena, comment_id)) orelse return error.NotFound; │ │148 + const comment = blk: { │ │149 + const DB = evt.EventDB(repo_opts.hash); │ │150 + var event_db_maybe: ?evt.LocalEventDB(repo_opts.hash) = if (repo_kind == .git) try evt.LocalEventDB(repo_opts.hash).openReadOnly(io, allocator, repo.core.repo_dir) else null;│ │151 + defer if (event_db_maybe) |*event_db| event_db.deinit(io, allocator); │ │152 + const moment = (if (event_db_maybe) |*event_db| │ │153 + evt.currentMomentFromDb(repo_opts.hash, event_db.db) │ │154 + else if (repo_kind == .git) │ │155 + return error.NotFound │ │156 + else │ │157 + evt.currentMoment(repo_opts, repo)) catch return error.NotFound; │ │158 + break :blk (try readById(DB, repo_opts.hash, moment, &arena, comment_id)) orelse return error.NotFound; │ │159 + }; │ │160 if (!std.mem.eql(u8, &comment.event.thread_id, thread_id)) return error.NotFound; │ │161 if (comment.removed) return error.NotFound; │ │162 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯