Skip to content

Commit

Permalink
regex: correct outdated docs
Browse files Browse the repository at this point in the history
This fixes a bug in the documentation of RegexBuilder that reflected the
old behavior of bytes::Regex where it disabled Unicode mode by default.
Instead, Unicode mode is now enabled by the default, and we can explain
the semantics of `.` purely in terms of whether Unicode mode is enabled
or not.
  • Loading branch information
BurntSushi committed Jul 18, 2018
1 parent 2918aab commit 3981d2a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/re_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ impl RegexBuilder {
/// anything when `s` is set and matches anything except for new line when
/// it is not set (the default).
///
/// N.B. "matches anything" means "any byte" for `regex::bytes::Regex`
/// expressions and means "any Unicode scalar value" for `regex::Regex`
/// expressions.
/// N.B. "matches anything" means "any byte" when Unicode is disabled and
/// means "any valid UTF-8 encoding of any Unicode scalar value" when
/// Unicode is enabled.
pub fn dot_matches_new_line(&mut self, yes: bool) -> &mut RegexBuilder {
self.0.dot_matches_new_line = yes;
self
Expand Down

0 comments on commit 3981d2a

Please sign in to comment.