matklad / once_cell

Rust library for single assignment cells and lazy statics without macros
Apache License 2.0
1.84k stars 110 forks source link

update `regex!` to support multiple regexes and `expr`s #188

Closed vidhanio closed 1 year ago

vidhanio commented 2 years ago

adding multiple regexes in the macro will return a tuple with all the regexes, and also allow using an expr to compile into the regex. this leaves the original api untouched, only adding more features.

matklad commented 2 years ago

This is an example, so I’d rather keep it simple rather than featerful.

vidhanio commented 2 years ago

i guess that does make sense, but in my opinion it doesn't add too much visual complexity to the documentation (although i admit the description could maybe use some work).