Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use longer lifetime when returning normalize iter #6060

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sffc
Copy link
Member

@sffc sffc commented Feb 2, 2025

#6058

Nothing should borrow from the borrowed type, because the borrowed type should not own anything.

@sffc sffc requested review from hsivonen and echeran as code owners February 2, 2025 17:49
@sffc sffc requested review from Manishearth and removed request for echeran February 2, 2025 17:54
/// Wraps a delegate iterator into a decomposing iterator
/// adapter by using the data already held by this normalizer.
pub fn normalize_iter<I: Iterator<Item = char>>(&self, iter: I) -> Decomposition<I> {
pub fn normalize_iter<I: Iterator<Item = char>>(&self, iter: I) -> Decomposition<'data, I> {
Copy link
Member

Choose a reason for hiding this comment

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

should these functions also take self? It's going to copy those parameters anyway.

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