Skip to content

Commit

Permalink
docs: Fix docstring for validate
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Dygalo <[email protected]>
  • Loading branch information
Stranger6667 committed Dec 15, 2024
1 parent 025084a commit f464b8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Documentation

- Fix documentation for `validate`

## [0.26.1] - 2024-10-29

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion crates/jsonschema/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl Validator {
pub fn new(schema: &Value) -> Result<Validator, ValidationError<'static>> {
Self::options().build(schema)
}
/// Run validation against `instance` and return an iterator over [`ValidationError`] in the error case.
/// Validate `instance` against `schema` and return the first error if any.
#[inline]
pub fn validate<'i>(&self, instance: &'i Value) -> Result<(), ValidationError<'i>> {
self.root.validate(instance, &LazyLocation::new())
Expand Down

0 comments on commit f464b8d

Please sign in to comment.