You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The user enters a load of those and then I want to match them with RegexSet. Currently I actually have pub regex: String which is fine, but the code is definitely nicer if Serde does the regex compilation (and it can give nicer error messages too).
The text was updated successfully, but these errors were encountered:
It would be easy yes, but I'm not going to add it. It would be a very misleading API. It would still have to recompile all of the regexes into a set, but I feel the API would suggest that it's doing something more clever.
You should be able to accept strings and then wire something up with serde's try_from attribute.
Hi, would it be easy to add a
RegexSet::from_regexes()
constructor that builds from an array ofRegex
s?Why? I have written a Serde adapter so my config file can have:
The user enters a load of those and then I want to match them with
RegexSet
. Currently I actually havepub regex: String
which is fine, but the code is definitely nicer if Serde does the regex compilation (and it can give nicer error messages too).The text was updated successfully, but these errors were encountered: