Skip to content

Using OnceCell to avoid re-compiling regex in multiple invocation of function #76817

Closed
@tesuji

Description

@tesuji

This is debug-only code so it doesn't matter too much in practice, and I'd guess this regex is so small it compiles nearly instantaneously. I wouldn't object to a PR adding a OnceCell if it didn't add too much noise to this code.

Originally posted by #76775 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-compilerRelevant to the compiler 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