linebender / linebender/druid

AppLauncher::configure_env should take FnOnce

Open
#2,053 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
9.7k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

### Description
Currently it is not possible to move values into the closure used by `AppLauncher::configure_env`. This is a problem when you want to do some one-time setup on the closure which requires moving outer values.

### Proposed solution
`AppLauncher::configure_env` should take a `FnOnce`. Since this function is only used once when calling `AppLauncher::launch`, which already takes `mut self` by value, this shouldn't break anything.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at AppLauncher::configure_env and follow its use when AppLauncher::launch consumes self. Verify the closure can move captured outer values while preserving the existing one-time configuration behavior, then run the relevant Rust tests or checks to confirm the API change does not break callers.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.