rust-windowing / rust-windowing/winit
Don't panic :)
Open
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. :)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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