From 861db1197db6d3f9ee0ce3f6e3434666da05a95c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?cel=20=F0=9F=8C=B8?= Date: Tue, 25 Feb 2025 23:30:27 +0000 Subject: [PATCH] feat(stanza): impl Clone for Stanza types --- stanza/src/client/iq.rs | 2 +- stanza/src/client/message.rs | 2 +- stanza/src/client/mod.rs | 2 +- stanza/src/client/presence.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stanza/src/client/iq.rs b/stanza/src/client/iq.rs index 2e87636..5c39938 100644 --- a/stanza/src/client/iq.rs +++ b/stanza/src/client/iq.rs @@ -15,7 +15,7 @@ use crate::{ use super::XMLNS; -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Iq { pub from: Option, pub id: String, diff --git a/stanza/src/client/message.rs b/stanza/src/client/message.rs index 703b80b..893e7cf 100644 --- a/stanza/src/client/message.rs +++ b/stanza/src/client/message.rs @@ -8,7 +8,7 @@ use peanuts::{ use super::XMLNS; -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Message { pub from: Option, pub id: Option, diff --git a/stanza/src/client/mod.rs b/stanza/src/client/mod.rs index 1f36dc3..3e690a7 100644 --- a/stanza/src/client/mod.rs +++ b/stanza/src/client/mod.rs @@ -16,7 +16,7 @@ pub mod presence; pub const XMLNS: &str = "jabber:client"; /// TODO: End tag -#[derive(Debug)] +#[derive(Debug, Clone)] pub enum Stanza { Message(Message), Presence(Presence), diff --git a/stanza/src/client/presence.rs b/stanza/src/client/presence.rs index ff7ba24..1603ace 100644 --- a/stanza/src/client/presence.rs +++ b/stanza/src/client/presence.rs @@ -8,7 +8,7 @@ use peanuts::{ use super::{error::Error, XMLNS}; -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Presence { pub from: Option, pub id: Option,