Skip to content

Remove redundant Vec clones in HPKE encrypt functions#982

Merged
spacebear21 merged 1 commit intopayjoin:masterfrom
bc1cindy:optimize/hpke-vec-clones-#402
Aug 21, 2025
Merged

Remove redundant Vec clones in HPKE encrypt functions#982
spacebear21 merged 1 commit intopayjoin:masterfrom
bc1cindy:optimize/hpke-vec-clones-#402

Conversation

@bc1cindy
Copy link
Contributor

@bc1cindy bc1cindy commented Aug 20, 2025

Closes #402

Replace .to_vec() calls with direct returns in encrypt_message_a and encrypt_message_b since message_a/message_b are already Vec and not used after the return statement.

Pull Request Checklist

Please confirm the following before requesting review:

  • A human has reviewed every single line of this code before opening the PR (no auto-generated, unreviewed LLM/robot submissions).
  • I have read CONTRIBUTING.md and rebased my branch to produce hygienic commits.

Replace .to_vec() calls with direct returns in encrypt_message_a and
encrypt_message_b since message_a/message_b are already Vec<u8> and
not used after the return statement.
@bc1cindy bc1cindy marked this pull request as ready for review August 20, 2025 23:24
@spacebear21 spacebear21 merged commit c0d47cf into payjoin:master Aug 21, 2025
10 checks passed
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.

Audit public API to take arguments by reference where possible before v1.0 release

2 participants