From 026b7d3c126346d86bb8bb99d6677f17965f1383 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 27 Nov 2020 20:55:41 +0100 Subject: [PATCH] xmpp-parsers/jingle: Fix Jingle::set_reason() helper. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It would add a content currently… --- xmpp-parsers/src/jingle.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmpp-parsers/src/jingle.rs b/xmpp-parsers/src/jingle.rs index 31cb8388..5db03c06 100644 --- a/xmpp-parsers/src/jingle.rs +++ b/xmpp-parsers/src/jingle.rs @@ -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 } }