mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
jingle: Remove unused clones.
This commit is contained in:
parent
9bd1e7f295
commit
17d6959606
1 changed files with 3 additions and 3 deletions
|
@ -381,16 +381,16 @@ impl TryFrom<Element> for Jingle {
|
||||||
|
|
||||||
for child in root.children().cloned() {
|
for child in root.children().cloned() {
|
||||||
if child.is("content", ns::JINGLE) {
|
if child.is("content", ns::JINGLE) {
|
||||||
let content = Content::try_from(child.clone())?;
|
let content = Content::try_from(child)?;
|
||||||
jingle.contents.push(content);
|
jingle.contents.push(content);
|
||||||
} else if child.is("reason", ns::JINGLE) {
|
} else if child.is("reason", ns::JINGLE) {
|
||||||
if jingle.reason.is_some() {
|
if jingle.reason.is_some() {
|
||||||
return Err(Error::ParseError("Jingle must not have more than one reason."));
|
return Err(Error::ParseError("Jingle must not have more than one reason."));
|
||||||
}
|
}
|
||||||
let reason = ReasonElement::try_from(child.clone())?;
|
let reason = ReasonElement::try_from(child)?;
|
||||||
jingle.reason = Some(reason);
|
jingle.reason = Some(reason);
|
||||||
} else {
|
} else {
|
||||||
jingle.other.push(child.clone());
|
jingle.other.push(child);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue