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

Change lifetime of markdown IntoIterator Item, as it does not need to live as long as the returned Element #2623

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

boondocklabs
Copy link
Contributor

The original lifetime of Item indicated that the Items yielded by an iterator must live as long as the returned Element, which is not required.

This made it difficult to work with data wrapped in a Mutex or RwLock as an iterator, as the guard creates a temporary variable which the compiler thinks needs to be held for the lifetime of the Element.

This adds another lifetime to indicate that Item's yielded byIntoIterator only need to last as long as the view function itself.

@hecrj hecrj added this to the 0.14 milestone Oct 2, 2024
@hecrj hecrj added improvement An internal improvement widget labels Oct 2, 2024
@hecrj hecrj enabled auto-merge October 2, 2024 16:01
@hecrj hecrj merged commit bc215f6 into iced-rs:master Oct 2, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement An internal improvement widget
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants