From 01a61c6099a00b6fca603eea6513b78283f19cf9 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 24 Jul 2024 18:02:46 +0200 Subject: [PATCH] =?UTF-8?q?xmpp-parsers:=20Convert=20pubsub=E2=80=99s=20De?= =?UTF-8?q?fault=20to=20xso?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parsers/src/pubsub/pubsub.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/parsers/src/pubsub/pubsub.rs b/parsers/src/pubsub/pubsub.rs index db565c64..1f2766b7 100644 --- a/parsers/src/pubsub/pubsub.rs +++ b/parsers/src/pubsub/pubsub.rs @@ -64,17 +64,17 @@ pub struct Create { pub node: Option, } -generate_element!( - /// Request for a default node configuration. - Default, "default", PUBSUB, - attributes: [ - /// The node targeted by this request, otherwise the entire service. - node: Option = "node", - - // TODO: do we really want to support collection nodes? - // type: Option = "type", - ] -); +/// Request for a default node configuration. +#[derive(FromXml, AsXml, PartialEq, Debug, Clone)] +#[xml(namespace = ns::PUBSUB, name = "default")] +pub struct Default { + /// The node targeted by this request, otherwise the entire service. + #[xml(attribute(default))] + pub node: Option, + // TODO: do we really want to support collection nodes? + // #[xml(attribute(default, name = "type"))] + // type_: Option, +} generate_element!( /// A request for a list of items.