Skip to content

Use OnceCell instead of SetLock #57

@Kitt3120

Description

@Kitt3120

Rust supports lazy loading since 1.70 with OnceCell and OnceLock, and especially since 1.80 with LazyCell and LazyLock. There is no need for SetLock to exist.

  1. Remove SetLock
  2. Refactor code to use OnceCell instead

Metadata

Metadata

Assignees

Labels

refactorOptimizes or restructures code

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions