Skip to content

Use of raw RWLock instead of RwLock #60576

Closed
@hellow554

Description

@hellow554

static HOOK_LOCK: RWLock = RWLock::new();
static mut HOOK: Hook = Hook::Default;

looking at these two lines of code is very frightening.
Is there a specific reason to use RWLock instead of RwLock? I would open a PR with either using RwLock or a comment describing why RWLock is needed here.

@rustbot modify labels: T-libs

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions