From a5a24a243d1cb0d423f5daa23aa31347c529f4e4 Mon Sep 17 00:00:00 2001 From: Paul Fariello Date: Mon, 28 Sep 2020 23:06:45 +0200 Subject: [PATCH] Use option for pubsub#owner delete redirect element --- xmpp-parsers/src/pubsub/owner.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xmpp-parsers/src/pubsub/owner.rs b/xmpp-parsers/src/pubsub/owner.rs index b5b394bde25e263fc79f5e9ea32c02d9d67208e1..6337292e21fe1b6e2cc3dd7df5e042a7a34e8b70 100644 --- a/xmpp-parsers/src/pubsub/owner.rs +++ b/xmpp-parsers/src/pubsub/owner.rs @@ -69,7 +69,7 @@ generate_element!( ], children: [ /// Redirection to replace the deleted node. - redirect: Vec = ("redirect", PUBSUB_OWNER) => Redirect + redirect: Option = ("redirect", PUBSUB_OWNER) => Redirect ] ); @@ -300,9 +300,9 @@ mod tests { let pubsub = PubSubOwner::Delete(Delete { node: NodeName(String::from("foo")), - redirect: vec![Redirect { + redirect: Some(Redirect { uri: String::from("xmpp:hamlet@denmark.lit?;node=blog"), - }], + }), }); let elem2 = Element::from(pubsub);