Skip to content

Commit 7d8d83a

Browse files
committed
release v0.3.3
1 parent a868f36 commit 7d8d83a

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

CHANGELOG.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# Change Log
22

3-
## [0.3.3] (in development)
3+
## [0.3.4] (in development)
4+
5+
## [0.3.3] 2023-17-07
46

57
### Changed
68

7-
* 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.
9+
* 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 !
10+
* The `message` method of `StructuredError` has been deprecated.
811

912
## [0.3.2] 2023-07-05
1013

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "libxml"
3-
version = "0.3.2"
3+
version = "0.3.3"
44
edition = "2021"
55
authors = ["Andreas Franzén <[email protected]>", "Deyan Ginev <[email protected]>","Jan Frederik Schaefer <[email protected]>"]
66
description = "A Rust wrapper for libxml2 - the XML C parser and toolkit developed for the Gnome project"

src/schemas/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ impl SchemaParserContext {
6161
pub fn drain_errors(&mut self) -> Vec<StructuredError> {
6262
assert!(!self.errlog.is_null());
6363
let errors = unsafe { &mut *self.errlog };
64-
errors.drain(0..).collect()
64+
std::mem::take(errors)
6565
}
6666

6767
/// Return a raw pointer to the underlying xmlSchemaParserCtxt structure

src/schemas/validation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl SchemaValidationContext {
8383
pub fn drain_errors(&mut self) -> Vec<StructuredError> {
8484
assert!(!self.errlog.is_null());
8585
let errors = unsafe { &mut *self.errlog };
86-
errors.drain(0..).collect()
86+
std::mem::take(errors)
8787
}
8888

8989
/// Return a raw pointer to the underlying xmlSchemaValidCtxt structure

0 commit comments

Comments
 (0)