Apply clippy suggestions for Rust 1.82
This commit is contained in:
parent
960c44af2f
commit
0f641fdc1a
|
@ -349,10 +349,11 @@ impl<'xml> Iterator for Context<'xml> {
|
||||||
Ok(Token::Cdata { text, .. }) => {
|
Ok(Token::Cdata { text, .. }) => {
|
||||||
return Some(Ok(Node::Text(Cow::Borrowed(text.as_str()))));
|
return Some(Ok(Node::Text(Cow::Borrowed(text.as_str()))));
|
||||||
}
|
}
|
||||||
Ok(Token::Declaration { .. }) => match self.stack.is_empty() {
|
Ok(Token::Declaration { .. }) => {
|
||||||
false => return Some(Err(Error::UnexpectedToken(format!("{token:?}")))),
|
if !self.stack.is_empty() {
|
||||||
true => {}
|
return Some(Err(Error::UnexpectedToken(format!("{token:?}"))));
|
||||||
},
|
}
|
||||||
|
}
|
||||||
Ok(Token::Comment { .. }) => continue,
|
Ok(Token::Comment { .. }) => continue,
|
||||||
Ok(token) => return Some(Err(Error::UnexpectedToken(format!("{token:?}")))),
|
Ok(token) => return Some(Err(Error::UnexpectedToken(format!("{token:?}")))),
|
||||||
Err(e) => return Some(Err(Error::Parse(e))),
|
Err(e) => return Some(Err(Error::Parse(e))),
|
||||||
|
|
Loading…
Reference in New Issue