Skip to content

refactor: make linked list iterator lifetimes explicit - #49

Closed
mevinagrise wants to merge 1 commit into
rcore-os:masterfrom
mevinagrise:fix-linked-list-lifetimes
Closed

refactor: make linked list iterator lifetimes explicit#49
mevinagrise wants to merge 1 commit into
rcore-os:masterfrom
mevinagrise:fix-linked-list-lifetimes

Conversation

@mevinagrise

Copy link
Copy Markdown
Contributor

This PR makes the return lifetimes of LinkedList::iter and LinkedList::iter_mut explicit.

Specific changes include:

  • Updated LinkedList::iter to return Iter<'_>.
  • Updated LinkedList::iter_mut to return IterMut<'_>.
  • Kept behavior unchanged while removing the current mismatched_lifetime_syntaxes warnings on newer toolchains.

Why this is useful:

  • This is a minimal code health improvement.
  • It keeps the API behavior exactly the same.
  • It reduces warning noise during cargo test and cargo test --doc.

Testing:

  • Ran cargo test.
  • Ran cargo test --doc.

@mevinagrise

Copy link
Copy Markdown
Contributor Author

Just noticed the issue is already fixed in the new release. Closing this PR now. Thanks!

@mevinagrise
mevinagrise deleted the fix-linked-list-lifetimes branch March 31, 2026 07:38
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.

1 participant