xmpp-parsers: Make DiscoInfoResult::features a BTreeSet

Features must never be duplicated, so we can use a BTreeSet instead of a
Vec to be nicer for users.

It makes the internal API for computing caps and ecaps2 a bit worse,
because it was expecting a slice directly, so for now let’s collect the
BTreeSet into a Vec when computing the thing.  A refactor to use
Iterator might make it better eventually, but I won’t work on that
before profiling it.
This commit is contained in:
Link Mauve 2026-02-21 20:34:36 +01:00
commit bc88134c41
6 changed files with 20 additions and 9 deletions

View file

@ -13,7 +13,8 @@ XXXX-YY-ZZ RELEASER <admin@example.com>
- Remove the unnecessary SaslMechanisms struct, to directly extract
SASL mechanisms in a Vec<String> in StreamFeatures.
- The type of disco::DiscoInfoResult::features changed from
Vec<Feature> to Vec<String>, this lets us remove Feature as well.
Vec<Feature> to BTreeSet<String>, this lets us remove Feature as
well.
- bind::BindFeature::required is now a bool, thanks to xsos flag.
- jingle_rtp::Description::rtcp_mux is now a bool flag too.
- stream_limits::Limits now extract directly to NonZeroU32.