Fix formatting with cargo fmt

This commit is contained in:
Dirkjan Ochtman 2022-06-09 10:43:56 +02:00
parent b5b5d376c2
commit b39f511128
2 changed files with 8 additions and 10 deletions

View File

@ -1,8 +1,8 @@
use std::fmt;
use std::collections::HashMap;
use std::fmt;
pub use xmlparser as xmlparser;
use thiserror::Error;
pub use xmlparser;
pub use macros::{FromXml, ToXml};

View File

@ -1,4 +1,4 @@
use xmlparser::{Token, ElementEnd};
use xmlparser::{ElementEnd, Token};
use super::Error;
@ -30,13 +30,11 @@ impl<'a> Parse for Option<Result<xmlparser::Token<'a>, xmlparser::Error>> {
fn element_end(self, _: Option<&str>, _: &str) -> Result<(), Error> {
match self {
Some(Ok(Token::ElementEnd { end, .. })) => {
match end {
Some(Ok(Token::ElementEnd { end, .. })) => match end {
ElementEnd::Open => todo!(),
ElementEnd::Close(_, _) => todo!(),
ElementEnd::Empty => return Ok(()),
}
}
},
Some(Ok(_)) => Err(Error::UnexpectedValue),
Some(Err(err)) => Err(err.into()),
None => Err(Error::UnexpectedEndOfStream),