╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─────────╮ │src/test/event.zig│ ╰──────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │617 _ = try std.fmt.hexToBytes(&first_issue_id, &events_to_consume[0].id); │ │618 const first_issue_cursor = try event_id_to_issue.getCursor(hash.hashInt(repo_opts.hash, &first_issue_id)) orelse return error.NotFound;│ │619 const first_issue_map = try Repo.DB.HashMap(.read_only).init(first_issue_cursor); │ │621 - const first_issue = try evt.EventData.read(Repo.DB, repo_opts.hash, arena.allocator(), first_issue_map, .issue); │ │620 + const first_issue = try evt.Issue.read(Repo.DB, repo_opts.hash, &arena, first_issue_map); │ │621 │ │623 - try std.testing.expectEqualStrings(events_to_consume[0].data.issue.?.description, first_issue.issue.description); │ │624 - try std.testing.expectEqualStrings(events_to_consume[0].data.issue.?.tags, first_issue.issue.tags); │ │622 + try std.testing.expectEqualStrings(events_to_consume[0].data.issue.?.description, first_issue.description); │ │623 + try std.testing.expectEqualStrings(events_to_consume[0].data.issue.?.tags, first_issue.tags); │ │624 } │ │625 │ │626 // make sure one of the new issues is there │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │630 _ = try std.fmt.hexToBytes(&first_issue_id, &events_to_consume2[0].id); │ │631 const first_issue_cursor = try event_id_to_issue.getCursor(hash.hashInt(repo_opts.hash, &first_issue_id)) orelse return error.NotFound;│ │632 const first_issue_map = try Repo.DB.HashMap(.read_only).init(first_issue_cursor); │ │634 - const first_issue = try evt.EventData.read(Repo.DB, repo_opts.hash, arena.allocator(), first_issue_map, .issue); │ │633 + const first_issue = try evt.Issue.read(Repo.DB, repo_opts.hash, &arena, first_issue_map); │ │634 │ │636 - try std.testing.expectEqualStrings(events_to_consume2[0].data.issue.?.description, first_issue.issue.description); │ │637 - try std.testing.expectEqualStrings(events_to_consume2[0].data.issue.?.tags, first_issue.issue.tags); │ │635 + try std.testing.expectEqualStrings(events_to_consume2[0].data.issue.?.description, first_issue.description); │ │636 + try std.testing.expectEqualStrings(events_to_consume2[0].data.issue.?.tags, first_issue.tags); │ │637 } │ │638 } │ │639 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │817 // │ │818 │ │819 var prng = std.Random.DefaultPrng.init(std.testing.random_seed); │ │821 - const user_event_id = evt.randomId(prng.random()); │ │822 - const repo_event_id = evt.randomId(prng.random()); │ │820 + const user_event_id = evt.Event.randomId(prng.random()); │ │821 + const repo_event_id = evt.Event.randomId(prng.random()); │ │822 │ │824 - var first_password_hash_buf: [usr.password_hash_max_len]u8 = undefined; │ │825 - const first_password_hash = try usr.hashPassword("correct horse battery staple", &first_password_hash_buf, io); │ │823 + var first_password_hash_buf: [evt.User.password_hash_max_len]u8 = undefined; │ │824 + const first_password_hash = try evt.User.hashPassword("correct horse battery staple", &first_password_hash_buf, io);│ │825 │ │827 - var second_password_hash_buf: [usr.password_hash_max_len]u8 = undefined; │ │828 - const second_password_hash = try usr.hashPassword("Tr0ub4dor&3", &second_password_hash_buf, io); │ │826 + var second_password_hash_buf: [evt.User.password_hash_max_len]u8 = undefined; │ │827 + const second_password_hash = try evt.User.hashPassword("Tr0ub4dor&3", &second_password_hash_buf, io); │ │828 │ │829 const events_to_consume = [_]evt.Event{ │ │830 .{ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │914 // get the user out of the map that was edited │ │915 const user_cursor = try event_id_to_user.getCursor(hash.hashInt(repo_opts.hash, &user_event_id)) orelse return error.NotFound; │ │916 const user_map = try Repo.DB.HashMap(.read_only).init(user_cursor); │ │918 - const user = try evt.EventData.read(Repo.DB, repo_opts.hash, arena.allocator(), user_map, .user); │ │917 + const user_event = try evt.User.read(Repo.DB, repo_opts.hash, &arena, user_map); │ │918 │ │919 // the password was correctly edited │ │921 - try std.testing.expectEqualStrings(events_to_consume[1].data.user.?.password_hash, user.user.password_hash); │ │920 + try std.testing.expectEqualStrings(events_to_consume[1].data.user.?.password_hash, user_event.password_hash); │ │921 │ │922 // get the map of repos │ │923 const event_id_to_repo_cursor = try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, "event-id->repo")) orelse return error.NotFound;│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │926 // get the repo out of the map │ │927 const repo_cursor = try event_id_to_repo.getCursor(hash.hashInt(repo_opts.hash, &repo_event_id)) orelse return error.NotFound; │ │928 const repo_map = try Repo.DB.HashMap(.read_only).init(repo_cursor); │ │930 - const repo_event = try evt.EventData.read(Repo.DB, repo_opts.hash, arena.allocator(), repo_map, .repo); │ │929 + const repo_event = try evt.Repo.read(Repo.DB, repo_opts.hash, &arena, repo_map); │ │930 │ │932 - try std.testing.expectEqualSlices(u8, &user_event_id, repo_event.repo.user_id); │ │933 - try std.testing.expectEqualStrings("ziglings", repo_event.repo.name); │ │931 + try std.testing.expectEqualSlices(u8, &user_event_id, repo_event.user_id); │ │932 + try std.testing.expectEqualStrings("ziglings", repo_event.name); │ │933 │ │934 // get the repos created by the user │ │935 const user_id_to_repos_cursor = try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, "user-id->repos")) orelse return error.NotFound;│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯