doc: add a doctest to demonstrate a separately-compiled regex set#861
Conversation
8fdfc08 to
f3ceb58
Compare
There was a problem hiding this comment.
Thanks! The substance looks good, but there are some details that I'd like to see fixed before merging.
Also, I do think these restrictions have a very good chance of being lifted in the future with new APIs on RegexSet. But it's still a long ways off so I agree it's worth clarifying the docs here for now.
| /// scan the exact same input a second time with those independently compiled | ||
| /// patterns: | ||
| /// ```rust | ||
| /// # use regex::{Regex, RegexSet}; |
There was a problem hiding this comment.
This shouldn't be commented. Other examples in this crate don't comment use lines out anyway.
There was a problem hiding this comment.
Ok, I have uncommented it! However, it looks like all the other examples in this file (re_set.rs) have this use statement commented out -- should I fix those, too? e.g.
Line 425 in 9aef5b1
|
Also, please squash down to one commit. |
40c7985 to
fe6dede
Compare
That's awesome to hear!! Turned on notifs for this repo! |
- explicitly link to and describe the operations that aren't available - reflow text and uncomment use statement
fe6dede to
cd623a1
Compare
|
Ping! |
It took me a while to understand the recommendation for how to get
Matchobjects when using aRegexSet. I tried to rewrite that part and added a doctest to make it super clear!