aboutsummaryrefslogtreecommitdiffstats
path: root/stanza/src/xep_0300.rs
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@bunny.garden>2025-04-03 09:45:41 +0100
committerLibravatar cel 🌸 <cel@bunny.garden>2025-04-03 09:45:41 +0100
commit9b18e40d8ba5f891e077daa039632f81d5fd2f86 (patch)
tree3b34d3449088cd1defb84ff8d10134e31c588ef0 /stanza/src/xep_0300.rs
parentf3bdd599425424de8dbff5e4e89b7bcdef205c85 (diff)
downloadluz-9b18e40d8ba5f891e077daa039632f81d5fd2f86.tar.gz
luz-9b18e40d8ba5f891e077daa039632f81d5fd2f86.tar.bz2
luz-9b18e40d8ba5f891e077daa039632f81d5fd2f86.zip
feat(stanza): xep-0128: service discovery extensions
Diffstat (limited to 'stanza/src/xep_0300.rs')
-rw-r--r--stanza/src/xep_0300.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/stanza/src/xep_0300.rs b/stanza/src/xep_0300.rs
index 9efad46..71a2c36 100644
--- a/stanza/src/xep_0300.rs
+++ b/stanza/src/xep_0300.rs
@@ -1,16 +1,16 @@
-use std::str::FromStr;
+use std::{convert::Infallible, str::FromStr};
use peanuts::{
element::{FromElement, IntoElement},
- DeserializeError, Element,
+ Element,
};
pub const XMLNS: &str = "urn:xmpp:hashes:2";
#[derive(Debug, Clone)]
pub struct Hash {
- algo: Algo,
- hash: String,
+ pub algo: Algo,
+ pub hash: String,
}
impl FromElement for Hash {
@@ -82,7 +82,7 @@ pub enum Algo {
}
impl FromStr for Algo {
- type Err = DeserializeError;
+ type Err = Infallible;
fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {