xmpp-parsers: Remove Feature from disco#info

This was just a newtype for a String, but in general using it was harder
than without it.  This simplifies the public API.
This commit is contained in:
Link Mauve 2026-01-09 00:25:32 +01:00
commit 946d96d7c8
7 changed files with 23 additions and 40 deletions

View file

@ -7,7 +7,7 @@
use xso::{AsXml, FromXml};
use crate::data_forms::DataForm;
use crate::disco::{DiscoInfoQuery, DiscoInfoResult, Feature, Identity};
use crate::disco::{DiscoInfoQuery, DiscoInfoResult, Identity};
use crate::hashes::{Algo, Hash};
use crate::ns;
use crate::presence::PresencePayload;
@ -64,8 +64,8 @@ fn compute_items<'x, T: 'x, I: IntoIterator<Item = &'x T>, F: Fn(&'x T) -> Vec<u
string
}
fn compute_features(features: &[Feature]) -> Vec<u8> {
compute_items(features, 0x1c, |feature| compute_item(&feature.var))
fn compute_features(features: &[String]) -> Vec<u8> {
compute_items(features, 0x1c, |feature| compute_item(&feature))
}
fn compute_identities(identities: &[Identity]) -> Vec<u8> {