Skip to content

Commit

Permalink
release v0.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dginev committed Jul 18, 2023
1 parent a868f36 commit 7d8d83a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Change Log

## [0.3.3] (in development)
## [0.3.4] (in development)

## [0.3.3] 2023-17-07

### Changed

* Update the implementation of StructuredError so that all validation errors are returned from the validation methods present on `SchemaValidationContext`. Previously, all returned validation errors were identical due to libxml reusing a global memory address for all reported errors.
* Update the implementation of `StructuredError` so that all validation errors are returned from the validation methods present on `SchemaValidationContext`. Previously, all returned validation errors were identical due to libxml reusing a global memory address for all reported errors. Thanks @JDSeiler !
* The `message` method of `StructuredError` has been deprecated.

## [0.3.2] 2023-07-05

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libxml"
version = "0.3.2"
version = "0.3.3"
edition = "2021"
authors = ["Andreas Franzén <andreas@devil.se>", "Deyan Ginev <deyan.ginev@gmail.com>","Jan Frederik Schaefer <j.schaefer@jacobs-university.de>"]
description = "A Rust wrapper for libxml2 - the XML C parser and toolkit developed for the Gnome project"
Expand Down
2 changes: 1 addition & 1 deletion src/schemas/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl SchemaParserContext {
pub fn drain_errors(&mut self) -> Vec<StructuredError> {
assert!(!self.errlog.is_null());
let errors = unsafe { &mut *self.errlog };
errors.drain(0..).collect()
std::mem::take(errors)
}

/// Return a raw pointer to the underlying xmlSchemaParserCtxt structure
Expand Down
2 changes: 1 addition & 1 deletion src/schemas/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl SchemaValidationContext {
pub fn drain_errors(&mut self) -> Vec<StructuredError> {
assert!(!self.errlog.is_null());
let errors = unsafe { &mut *self.errlog };
errors.drain(0..).collect()
std::mem::take(errors)
}

/// Return a raw pointer to the underlying xmlSchemaValidCtxt structure
Expand Down

0 comments on commit 7d8d83a

Please sign in to comment.