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