rust-windowing / rust-windowing/winit

Don't panic :)

Open
#971 6 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C - needs discussion S - api S - meta
Dominant language
Rust
Stars
6.2k
Forks
1.3k
Avg merge
2d 19h
Merged PRs (30d)
9

Description

I think there is too much unwrap in winit and it could benefit from a healty dose of Results. Thus I'm opening this issue to spark discussion on:

  • Is such a change desirable? (I vote "yes".)
  • To people knowing more about winit internals: Is it feasible? (If we can only get rid of panics in half the places, it might be more confusing to users than just a "catch the panic if you care" policy.)
  • If yes, start a PR converting a handful of currently non-Result-returning functions to return Result. (/me volunteers.)
  • Decide on when to release this. Seems to make sense to not include this change in 0.20, but maybe 0.21?
  • Pretty please use the codename "Don't panic :)" for that release. :)

Original discussion.

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 with the linked original discussion and review winit's use of unwrap to understand the scope and feasibility of replacing panics with Results. Done would require an agreed, manageable scope, release timing, and a concrete pull request; the issue names no files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop, operating-systems
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.