xmpp-parsers/jingle: Fix Jingle::set_reason() helper.

It would add a content currently…
This commit is contained in:
Emmanuel Gil Peyrot 2020-11-27 20:55:41 +01:00
parent 59ccccbedc
commit 026b7d3c12

View file

@ -586,8 +586,8 @@ impl Jingle {
}
/// Set the reason in this Jingle container.
pub fn set_reason(mut self, content: Content) -> Jingle {
self.contents.push(content);
pub fn set_reason(mut self, reason: ReasonElement) -> Jingle {
self.reason = Some(reason);
self
}
}