Skip to content

feat: add must_use attributes to Router::spawn#3772

Merged
Frando merged 2 commits intomainfrom
Frando/must_use
Dec 13, 2025
Merged

feat: add must_use attributes to Router::spawn#3772
Frando merged 2 commits intomainfrom
Frando/must_use

Conversation

@Frando
Copy link
Copy Markdown
Member

@Frando Frando commented Dec 12, 2025

Description

A router is stopped when dropped, so let's add a must_use attribute to its spawn function. This quite easily prevents a common footgun people run into.

Breaking Changes

Notes & open questions

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:

@Frando Frando marked this pull request as ready for review December 12, 2025 20:19
Copy link
Copy Markdown
Member

@b5 b5 left a comment

Choose a reason for hiding this comment

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

thank you for the must_use comment as well.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 12, 2025

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

Last updated: 2025-12-13T19:46:35Z

@Arqu
Copy link
Copy Markdown
Collaborator

Arqu commented Dec 12, 2025

Did you forget EndpointBuilder::bind, or just update commit title.

@Frando Frando changed the title feat: add must_use attributes to Router::spawn and EnpointBuilder::bind feat: add must_use attributes to Router::spawn Dec 12, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 12, 2025

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: 2707ae2

@n0bot n0bot bot added this to iroh Dec 12, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Dec 12, 2025
@Frando Frando added this pull request to the merge queue Dec 13, 2025
Merged via the queue into main with commit 0a9b7a0 Dec 13, 2025
29 checks passed
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in iroh Dec 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

5 participants