Skip to content

Commit

Permalink
fix(rust_consumer): correct term! documentation
Browse files Browse the repository at this point in the history
Correct the example regex used for the term! and matching_regex! docs,
and remove an accidental copy-pasta from the comment string in the
example.

Fixes #424
  • Loading branch information
mjpieters committed May 20, 2024
1 parent e44458a commit 87e82e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rust/pact_consumer/src/patterns/special_rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,8 @@ pub fn build_regex<S: AsRef<str>>(regex_str: S) -> Regex {
/// # fn main() {
/// json_pattern!({
/// // Match a string consisting of numbers and lower case letters, and
/// // generate `"10a"`.$crate::patterns::
/// "id_string": term!("^[0-9a-z]$", "10a")
/// // generate `"10a"`.
/// "id_string": term!("^[0-9a-z]+$", "10a")
/// });
/// # }
/// ```
Expand All @@ -398,8 +398,8 @@ macro_rules! term {
/// # fn main() {
/// json_pattern!({
/// // Match a string consisting of numbers and lower case letters, and
/// // generate `"10a"`.$crate::patterns::
/// "id_string": matching_regex!("^[0-9a-z]$", "10a")
/// // generate `"10a"`
/// "id_string": matching_regex!("^[0-9a-z]+$", "10a")
/// });
/// # }
/// ```
Expand Down

0 comments on commit 87e82e1

Please sign in to comment.