Skip to content

Build Regex from static string in a const way #1256

@ValentinColin

Description

@ValentinColin

Describe your feature request

Regex are often hardcoded, so it would be nice to be able to build a Regex from a static str in a const context to avoid handling error that will never happens. The build step of the regex we be done a compile time and not at runtime.

Example with the crate http: http::header::HeaderValue::from_static(&'static str).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions