Skip to content

Commit

Permalink
clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
dginev committed Nov 17, 2022
1 parent 1eb47f0 commit 474695d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ fn try_usize_to_i32(value: usize) -> Result<i32, XmlParseError> {
}
}

#[derive(PartialEq, Eq)]
#[derive(Debug, PartialEq, Eq)]
/// Enum for the parse formats supported by libxml2
pub enum ParseFormat {
/// Strict parsing for XML
Expand Down
2 changes: 1 addition & 1 deletion src/schemas/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl SchemaParserContext {
/// Private Interface
impl SchemaParserContext {
fn from_raw(parser: *mut bindings::_xmlSchemaParserCtxt) -> Self {
let errors: Box<Vec<StructuredError>> = Box::new(Vec::new());
let errors: Box<Vec<StructuredError>> = Box::default();

unsafe {
let reference: *mut Vec<StructuredError> = std::mem::transmute(errors);
Expand Down
2 changes: 1 addition & 1 deletion src/schemas/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl SchemaValidationContext {
/// Private Interface
impl SchemaValidationContext {
fn from_raw(ctx: *mut bindings::_xmlSchemaValidCtxt, schema: Schema) -> Self {
let errors: Box<Vec<StructuredError>> = Box::new(Vec::new());
let errors: Box<Vec<StructuredError>> = Box::default();

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

0 comments on commit 474695d

Please sign in to comment.