Lots of clippy appeasement

This commit is contained in:
Lennart
2025-10-27 20:12:21 +01:00
parent 0d071d3b92
commit 86cf490fa9
84 changed files with 413 additions and 435 deletions

View File

@@ -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) {