Webfinger: impl PartialEq

It'd be nice to be able to compare these in tests.
This commit is contained in:
Brad Dunbar 2025-11-20 12:47:06 -05:00
parent 8b2b746707
commit 3de8e4ca00
No known key found for this signature in database
GPG key ID: C32E3CC9B201C719

View file

@ -222,7 +222,7 @@ pub fn build_webfinger_response_with_type(
} }
/// A webfinger response with information about a `Person` or other type of actor. /// A webfinger response with information about a `Person` or other type of actor.
#[derive(Serialize, Deserialize, Debug, Default)] #[derive(Serialize, Deserialize, Debug, Default, PartialEq)]
pub struct Webfinger { pub struct Webfinger {
/// The actor which is described here, for example `acct:LemmyDev@mastodon.social` /// The actor which is described here, for example `acct:LemmyDev@mastodon.social`
pub subject: String, pub subject: String,
@ -237,7 +237,7 @@ pub struct Webfinger {
} }
/// A single link included as part of a [Webfinger] response. /// A single link included as part of a [Webfinger] response.
#[derive(Serialize, Deserialize, Debug, Default)] #[derive(Serialize, Deserialize, Debug, Default, PartialEq)]
pub struct WebfingerLink { pub struct WebfingerLink {
/// Relationship of the link, such as `self` or `http://webfinger.net/rel/profile-page` /// Relationship of the link, such as `self` or `http://webfinger.net/rel/profile-page`
pub rel: Option<String>, pub rel: Option<String>,