Skip to content

refactor: PreKeyStore does not require mutable self references [WPB-25640]#57

Merged
coriolinus merged 4 commits into
developfrom
prgn/refactor/25640-prekeystore-not-mutable
Jun 3, 2026
Merged

refactor: PreKeyStore does not require mutable self references [WPB-25640]#57
coriolinus merged 4 commits into
developfrom
prgn/refactor/25640-prekeystore-not-mutable

Conversation

@coriolinus
Copy link
Copy Markdown
Contributor


PR Submission Checklist for internal contributors

  • The PR Title
    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³

Requiring mutable access to the keystore for potentially mutating
methods is logical for items which live in memory; I can't fault
the developers for doing it this way.

Unfortunately, real database abstractions tend towards hiding the
mutability, and requiring it in this trait is blocking a refactor
we'd like to accomplish. This trait is the only method on that type
which requires mutability. So we're adjusting the trait.
Also we substantially simplify the actual implementation.
@coriolinus coriolinus force-pushed the prgn/refactor/25640-prekeystore-not-mutable branch from 569bc6a to 4fc1771 Compare June 3, 2026 09:04
Comment thread src/internal/session.rs Outdated
Comment thread src/internal/session.rs
Copy link
Copy Markdown
Member

@istankovic istankovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍

@coriolinus coriolinus force-pushed the prgn/refactor/25640-prekeystore-not-mutable branch from fb28690 to 3b6a1a4 Compare June 3, 2026 09:58
@coriolinus coriolinus merged commit 3b6a1a4 into develop Jun 3, 2026
2 checks passed
@coriolinus coriolinus deleted the prgn/refactor/25640-prekeystore-not-mutable branch June 3, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants