Skip to content

Commit 1d82e6f

Browse files
Zantierrlouf
authored andcommitted
Fix cargo test
There was a parameter missing in documentation tests, after 437ac65.
1 parent 437ac65 commit 1d82e6f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/json_schema/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,12 @@ use crate::Result;
127127
/// }"#;
128128
///
129129
/// // Generate regex from schema
130-
/// let regex = json_schema::regex_from_str(&schema, None)?;
130+
/// let regex = json_schema::regex_from_str(&schema, None, None)?;
131131
/// println!("Generated regex: {}", regex);
132132
///
133133
/// // Custom whitespace pattern could be passed as well
134134
/// let whitespace_pattern = Some(r#"[\n ]*"#);
135-
/// let regex = json_schema::regex_from_str(&schema, whitespace_pattern)?;
135+
/// let regex = json_schema::regex_from_str(&schema, whitespace_pattern, None)?;
136136
/// println!("Generated regex with custom whitespace pattern: {}", regex);
137137
///
138138
/// # Ok(())
@@ -171,12 +171,12 @@ pub fn regex_from_str(
171171
/// let schema_value: Value = serde_json::from_str(schema)?;
172172
///
173173
/// // It's possible to generate a regex from schema value
174-
/// let regex = json_schema::regex_from_value(&schema_value, None)?;
174+
/// let regex = json_schema::regex_from_value(&schema_value, None, None)?;
175175
/// println!("Generated regex: {}", regex);
176176
///
177177
/// // Custom whitespace pattern could be passed as well
178178
/// let whitespace_pattern = Some(r#"[\n ]*"#);
179-
/// let regex = json_schema::regex_from_value(&schema_value, whitespace_pattern)?;
179+
/// let regex = json_schema::regex_from_value(&schema_value, whitespace_pattern, None)?;
180180
/// println!("Generated regex with custom whitespace pattern: {}", regex);
181181
///
182182
/// # Ok(())

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
//! }"#;
5858
//!
5959
//! // Generate a regular expression from it
60-
//! let regex = json_schema::regex_from_str(&schema, None)?;
60+
//! let regex = json_schema::regex_from_str(&schema, None, None)?;
6161
//! println!("Generated regex: {}", regex);
6262
//!
6363
//! // Create `Vocabulary` from pretrained large language model (but manually is also possible)

0 commit comments

Comments
 (0)