Skip to content

refactor: try to use 'static to denote impls that don't reference argument lifetimes #3392

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

Draft
wants to merge 11 commits into
base: deps-update
Choose a base branch
from

Conversation

rklaehn
Copy link
Contributor

@rklaehn rklaehn commented Jul 16, 2025

Description

Try to use 'static instead of the new and somewhat weird use<> syntax to express that a function return argument does not reference any of the lifetimes of the function arguments or &self.

Breaking Changes

'static seems to be subtly different than use<> even though I don't really understand the difference.

Notes & open questions

I find 'static more clear to express that the result does not capture any lifetimes... YMMV.

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.
    • List all breaking changes in the above "Breaking Changes" section.
    • Open an issue or PR on any number0 repos that are affected by this breaking change. Give guidance on how the updates should be handled or do the actual updates themselves. The major ones are:

Copy link

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3392/docs/iroh/

Last updated: 2025-07-16T09:41:25Z

Copy link

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: c12eb70

@n0bot n0bot bot added this to iroh Jul 16, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

2 participants