DioxusLabs / DioxusLabs/dioxus

Rename `read_unchecked` methods

Open
#4,517 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

`read_unchecked` ([e.g](https://docs.rs/dioxus/latest/dioxus/prelude/trait.Readable.html#method.read_unchecked)) is poorly named. Whenever I use it I feel like I am doing something unsafe like with the unchecked functions in the std lib. There really is nothing unchecked here - the lifetime is not unchecked, it is extended. A better name would be e.g. `read_static` or `read_runtime_checked` or `read_extended` since it gives the read `Ref` a static lifetime and relies on runtime checking instead.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.