Fix formatting with cargo fmt
This commit is contained in:
parent
b5b5d376c2
commit
b39f511128
|
@ -1,8 +1,8 @@
|
||||||
use std::fmt;
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
use std::fmt;
|
||||||
|
|
||||||
pub use xmlparser as xmlparser;
|
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
pub use xmlparser;
|
||||||
|
|
||||||
pub use macros::{FromXml, ToXml};
|
pub use macros::{FromXml, ToXml};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use xmlparser::{Token, ElementEnd};
|
use xmlparser::{ElementEnd, Token};
|
||||||
|
|
||||||
use super::Error;
|
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> {
|
fn element_end(self, _: Option<&str>, _: &str) -> Result<(), Error> {
|
||||||
match self {
|
match self {
|
||||||
Some(Ok(Token::ElementEnd { end, .. })) => {
|
Some(Ok(Token::ElementEnd { end, .. })) => match end {
|
||||||
match end {
|
ElementEnd::Open => todo!(),
|
||||||
ElementEnd::Open => todo!(),
|
ElementEnd::Close(_, _) => todo!(),
|
||||||
ElementEnd::Close(_, _) => todo!(),
|
ElementEnd::Empty => return Ok(()),
|
||||||
ElementEnd::Empty => return Ok(()),
|
},
|
||||||
}
|
|
||||||
}
|
|
||||||
Some(Ok(_)) => Err(Error::UnexpectedValue),
|
Some(Ok(_)) => Err(Error::UnexpectedValue),
|
||||||
Some(Err(err)) => Err(err.into()),
|
Some(Err(err)) => Err(err.into()),
|
||||||
None => Err(Error::UnexpectedEndOfStream),
|
None => Err(Error::UnexpectedEndOfStream),
|
||||||
|
|
Loading…
Reference in New Issue