╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Issue.zig ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯
335 // remove an issue's order key from its labels' `status` sets, pruning entries 336 // whose set becomes empty 337 fn removeFromLabelSets( 338 comptime DB: type, 339 label_to_issues: DB.SortedMap(.read_write), 340 labels: []const u8, 341 status: Status, 342 order_key: []const u8, 343 ) !void { 344 var label_iter = labelIterator(labels); 345 while (label_iter.next()) |label| { 346 // skipped the same way consume skipped it, so it was never indexed 347 if (label.len == 0 or label.len > label_max_len) continue; 348 var key_buffer: LabelStatusKey = undefined; 349 const key = try labelStatusKey(&key_buffer, label, status); 350 const label_set_cursor = try label_to_issues.putCursor(key); 351 const label_set = try DB.SortedSet(.read_write).init(label_set_cursor); 352 _ = try label_set.remove(order_key); 353 if (0 == try label_set.count()) _ = try label_to_issues.remove(key); 354 } 355 } 356