mirror of
https://github.com/lennart-k/rustical.git
synced 2026-01-30 22:28:22 +00:00
Lots of clippy appeasement
This commit is contained in:
@@ -18,10 +18,7 @@ pub trait XmlDocument: XmlDeserialize {
|
||||
fn parse<R: BufRead>(reader: quick_xml::NsReader<R>) -> Result<Self, XmlError>;
|
||||
|
||||
#[inline]
|
||||
fn parse_reader<R: BufRead>(input: R) -> Result<Self, XmlError>
|
||||
where
|
||||
Self: XmlDeserialize,
|
||||
{
|
||||
fn parse_reader<R: BufRead>(input: R) -> Result<Self, XmlError> {
|
||||
let mut reader = quick_xml::NsReader::from_reader(input);
|
||||
reader.config_mut().trim_text(true);
|
||||
Self::parse(reader)
|
||||
@@ -43,8 +40,7 @@ impl<T: XmlRootTag + XmlDeserialize> XmlDocument for T {
|
||||
let event = reader.read_event_into(&mut buf)?;
|
||||
let empty = matches!(event, Event::Empty(_));
|
||||
match event {
|
||||
Event::Decl(_) => { /* <?xml ... ?> ignore this */ }
|
||||
Event::Comment(_) => { /* ignore this */ }
|
||||
Event::Decl(_) | Event::Comment(_) => { /* ignore this */ }
|
||||
Event::Start(start) | Event::Empty(start) => {
|
||||
let (ns, name) = reader.resolve_element(start.name());
|
||||
let matches = match (Self::root_ns(), &ns, name) {
|
||||
|
||||
Reference in New Issue
Block a user