Fix most clippy warnings.
This commit is contained in:
parent
2b29748e6b
commit
4ec92b16ac
5 changed files with 9 additions and 12 deletions
|
|
@ -173,7 +173,7 @@ impl<'a> TryFrom<&'a Element> for StanzaError {
|
|||
return Err(Error::ParseError("Unknown element in error text."));
|
||||
}
|
||||
let lang = child.attr("xml:lang").unwrap_or("").to_owned();
|
||||
if let Some(_) = texts.insert(lang, child.text()) {
|
||||
if texts.insert(lang, child.text()).is_some() {
|
||||
return Err(Error::ParseError("Text element present twice for the same xml:lang."));
|
||||
}
|
||||
} else if child.ns() == Some(ns::XMPP_STANZAS) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue