Skip to content

Avoid copy in MailAddrList::extract_single_info() - #153

Merged
staktrace merged 1 commit into
staktrace:masterfrom
staktrace-bot:avoid-extract-single-info-clone
Nov 21, 2026
Merged

staktrace merged 1 commit into
staktrace:masterfrom
staktrace-bot:avoid-extract-single-info-clone

Conversation

@staktrace-bot

Copy link
Copy Markdown
Collaborator

Patch by @martinetd from #152.

extract_single_info() already takes ownership of the MailAddrList, so it can move the inner MailAddr::Single out of the vec instead of cloning it.

Fixes #152

Since extract_single_info() takes the list ownership we don't need
to copy the inner MailAddr::Single, and can pass it directly
@staktrace
staktrace merged commit 0be4968 into staktrace:master Nov 21, 2026
5 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.

(optim) useless clone in MailAddrList::extract_single_info

3 participants