rust-windowing / rust-windowing/winit

`control_flow` by `&mut` rationale

Open
#1,018 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

F - question S - meta
Dominant language
Rust
Stars
6.2k
Forks
1.3k
Avg merge
2d 19h
Merged PRs (30d)
9

Description

I would like to understand the rationale for having control_flow as a mutable parameter rather than the return value in the EventLoop::run and similar methods. I am confused because when returned by value it is harder to forget to set it. What are the downsides?

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 by reviewing the EventLoop::run and similar methods mentioned in the issue, then read the existing six-comment discussion for context. Done would mean documenting a settled rationale for the mutable control_flow parameter or reaching a decided API direction; the issue does not name specific files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.