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
Probably not useful for the initial release but something to consider for later. This could be done three ways:
add that information as a flag to the repl from construction
pre-check the resolvers at extraction
capture lazily instead of eagerly
The first two complicate resolution as it means resolve has to be duplicated to handle the None/Replacement cases separately, the latter probably just means constructing the capture once using OnceCell (/ LazyCell) instead of using a Capture parameter.
Later clarification for myself: this is about calling re.capture during extraction e.g.
::None and ::Replacement resolver variants have no need for the capture data, although that means resolve would need to be faillible. Then again, we could just expect/unwrap since by definition matching should only yield matching regexes, so captures should always succeed.
The text was updated successfully, but these errors were encountered:
Probably not useful for the initial release but something to consider for later. This could be done three ways:
The first two complicate resolution as it means
resolve
has to be duplicated to handle theNone
/Replacement
cases separately, the latter probably just means constructing the capture once usingOnceCell
(/LazyCell
) instead of using aCapture
parameter.Later clarification for myself: this is about calling
re.capture
during extraction e.g.uap-rust/ua-parser/src/lib.rs
Line 237 in 2cd7c6a
::None
and::Replacement
resolver variants have no need for the capture data, although that meansresolve
would need to be faillible. Then again, we could justexpect
/unwrap
since by definitionmatching
should only yield matching regexes, socaptures
should always succeed.The text was updated successfully, but these errors were encountered: