lazy-regex icon indicating copy to clipboard operation
lazy-regex copied to clipboard

lazy static regular expressions checked at compile time

Results 7 lazy-regex issues
Sort by recently updated
recently updated
newest added

Building a project with cargo --minimal-versions will fail since `syn`'s version is too low. Relevant release https://github.com/dtolnay/syn/releases/tag/1.0.22

`Lazy` and `OnceCell` types are basically the same in their semantics except for one thing. `OnceCell` is constructed with an empty constructor (`OnceCell::new()`), and the closure that initializes the `OnceCell`...

Hey. Thanks for this crate :pray: It'd be useful if we had a `no_std` feature for `lazy-regex`, as `regex` already supports via no-default-features. This should be doable just by refactoring...

This is because the `lazy-regex-proc_macros` crate still depends on `regex` instead of `regex-lite` when enabling the `lite` feature.

Currently, `lazy-regex` supports string literals only. Is there any way that constants can be (maybe partially) supported? As I exploit `lazy-regex`, my regex's grew more insane and I use `const_format`...

This (shortened) code does what's expected: ```rust regex_switch!(s, r"^export:(?.+)$" => Self::Export(name.to_string()), r"^(?:internal:)?toggle-backtrace\(2\)$" => Self::ToggleBacktrace("2"), r"^(?:internal:)?toggle-backtrace\(full\)$" => Self::ToggleBacktrace("full"), r"^(?:internal:)?toggle-backtrace\((?)\)$" => { return Err(ParseActionError::InvalidBacktraceLevel(level.to_string())); } r"^(?:internal:)?toggle-summary$" => Self::ToggleSummary, r"^focus[_-]file\((?.*)\)$" => Self::FocusFile(FocusFileCommand::new(file)), ).ok_or(ParseActionError::UnknownAction(s.to_string()))...

Replaced **once_cell::sync::Lazy** with **std::sync::LazyLock**. The standard library's LazyLock provides equivalent functionality and avoids the need for an external dependency.