Skip to content

Commit 3981d2a

Browse files
committed
regex: correct outdated docs
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.
1 parent 2918aab commit 3981d2a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/re_builder.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ impl RegexBuilder {
106106
/// anything when `s` is set and matches anything except for new line when
107107
/// it is not set (the default).
108108
///
109-
/// N.B. "matches anything" means "any byte" for `regex::bytes::Regex`
110-
/// expressions and means "any Unicode scalar value" for `regex::Regex`
111-
/// expressions.
109+
/// N.B. "matches anything" means "any byte" when Unicode is disabled and
110+
/// means "any valid UTF-8 encoding of any Unicode scalar value" when
111+
/// Unicode is enabled.
112112
pub fn dot_matches_new_line(&mut self, yes: bool) -> &mut RegexBuilder {
113113
self.0.dot_matches_new_line = yes;
114114
self

0 commit comments

Comments
 (0)