From 9b18e40d8ba5f891e077daa039632f81d5fd2f86 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Thu, 3 Apr 2025 09:45:41 +0100 Subject: feat(stanza): xep-0128: service discovery extensions --- stanza/src/xep_0300.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'stanza/src/xep_0300.rs') 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 { match s { -- cgit