From 9959abbb256ba048e4f5e3e144cc13894a4a8bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sun, 31 Dec 2017 16:31:10 +0000 Subject: [PATCH] Be explicit about quick-xml Events we are handling --- src/element.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/element.rs b/src/element.rs index e398d40f..7d88d2d9 100644 --- a/src/element.rs +++ b/src/element.rs @@ -295,7 +295,13 @@ impl Element { Event::Eof => { bail!(ErrorKind::EndOfDocument); }, - _ => (), // TODO: may need more errors + Event::Text { .. } | + Event::End { .. } | + Event::Comment { .. } | + Event::CData { .. } | + Event::Decl { .. } | + Event::PI { .. } | + Event::DocType { .. } => (), // TODO: may need more errors } }; @@ -334,7 +340,10 @@ impl Element { Event::Eof => { break; }, - _ => (), // TODO: may need to implement more + Event::Comment { .. } | + Event::Decl { .. } | + Event::PI { .. } | + Event::DocType { .. } => (), } } Ok(stack.pop().unwrap())