From 262840a12cdfe9fd15d2de4cea52549b51224f14 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Thu, 9 Jun 2022 10:44:33 +0200 Subject: [PATCH] Apply clippy suggestion --- instant-xml/src/lib.rs | 1 + instant-xml/src/parse.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/instant-xml/src/lib.rs b/instant-xml/src/lib.rs index 5896a24..98facff 100644 --- a/instant-xml/src/lib.rs +++ b/instant-xml/src/lib.rs @@ -25,6 +25,7 @@ pub trait FromXml<'xml>: Sized { pub trait FromXmlOwned: for<'xml> FromXml<'xml> {} +#[allow(dead_code)] struct State<'a> { prefix: HashMap<&'a str, &'a str>, } diff --git a/instant-xml/src/parse.rs b/instant-xml/src/parse.rs index 6df1125..6d41343 100644 --- a/instant-xml/src/parse.rs +++ b/instant-xml/src/parse.rs @@ -33,7 +33,7 @@ impl<'a> Parse for Option, xmlparser::Error>> { Some(Ok(Token::ElementEnd { end, .. })) => match end { ElementEnd::Open => todo!(), ElementEnd::Close(_, _) => todo!(), - ElementEnd::Empty => return Ok(()), + ElementEnd::Empty => Ok(()), }, Some(Ok(_)) => Err(Error::UnexpectedValue), Some(Err(err)) => Err(err.into()),