RawHandleWrapper::set_display_handle is safe, but docs have a safety section.
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## How can Bevy's documentation be improved?
> Provide a link to the documentation and describe how it could be improved. In what ways is it incomplete, incorrect, or misleading?
[link](https://docs.rs/bevy_window/latest/bevy_window/struct.RawHandleWrapper.html#method.set_display_handle)
the method is not unsafe, but the docs have a safety section.
non-unsafe functions are always safe to call so either the method is unsound or the docs are wrong.
> If you have suggestions on exactly what the new docs should say, feel free to include them here. Alternatively, make the changes yourself and [create a pull request](https://bevy.org/learn/contribute/helping-out/writing-docs/) instead.
if the method is actually safe either remove or rename the safety section,
if the docs are correct and the method is unsafe to call then it should be unsafe.
i'm not sure which option is correct, windowing is confusing.
the link is to 0.18.1 docs, but the issue is also present on 0.19.0-rc2.
Contributor guide
Research direction
Start with the linked RawHandleWrapper::set_display_handle documentation and compare its safety section with the method's Rust signature and surrounding windowing API docs. Determine whether the safety guidance or API declaration is incorrect; the work is done when the signature and documentation consistently describe how the method may be called.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop-dev, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100