Skip to content

Commit 474695d

Browse files
committed
clippy lints
1 parent 1eb47f0 commit 474695d

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ fn try_usize_to_i32(value: usize) -> Result<i32, XmlParseError> {
196196
}
197197
}
198198

199-
#[derive(PartialEq, Eq)]
199+
#[derive(Debug, PartialEq, Eq)]
200200
/// Enum for the parse formats supported by libxml2
201201
pub enum ParseFormat {
202202
/// Strict parsing for XML

src/schemas/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl SchemaParserContext {
7373
/// Private Interface
7474
impl SchemaParserContext {
7575
fn from_raw(parser: *mut bindings::_xmlSchemaParserCtxt) -> Self {
76-
let errors: Box<Vec<StructuredError>> = Box::new(Vec::new());
76+
let errors: Box<Vec<StructuredError>> = Box::default();
7777

7878
unsafe {
7979
let reference: *mut Vec<StructuredError> = std::mem::transmute(errors);

src/schemas/validation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl SchemaValidationContext {
9595
/// Private Interface
9696
impl SchemaValidationContext {
9797
fn from_raw(ctx: *mut bindings::_xmlSchemaValidCtxt, schema: Schema) -> Self {
98-
let errors: Box<Vec<StructuredError>> = Box::new(Vec::new());
98+
let errors: Box<Vec<StructuredError>> = Box::default();
9999

100100
unsafe {
101101
let reference: *mut Vec<StructuredError> = std::mem::transmute(errors);

0 commit comments

Comments
 (0)