Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread local updates for idiomatic examples #123651

Merged
merged 3 commits into from
Apr 14, 2024

Commits on Apr 8, 2024

  1. Update thread local docs with idiomatic cell type use

    The `thread_local!` examples use `RefCell` for `Copy` types. Update
    examples to have one `Copy` and one non-`Copy` type using `Cell` and
    `RefCell`, respectively.
    tgross35 committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    2aec2fe View commit details
    Browse the repository at this point in the history
  2. Add SAFETY comments to the thread local implementation

    Reduce `unsafe` block scope and add `SAFETY` comments.
    tgross35 committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    6e68a2f View commit details
    Browse the repository at this point in the history
  3. Change method calls to using the method directly

    This is in accordance with Clippy's redundant_closure_for_method_calls.
    tgross35 committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    313085f View commit details
    Browse the repository at this point in the history