From 3de8e4ca00b605e0dddb8e29a51e219fa8733248 Mon Sep 17 00:00:00 2001 From: Brad Dunbar Date: Thu, 20 Nov 2025 12:47:06 -0500 Subject: [PATCH] Webfinger: impl PartialEq It'd be nice to be able to compare these in tests. --- src/fetch/webfinger.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fetch/webfinger.rs b/src/fetch/webfinger.rs index 2ad7f4b..2eb0d67 100644 --- a/src/fetch/webfinger.rs +++ b/src/fetch/webfinger.rs @@ -222,7 +222,7 @@ pub fn build_webfinger_response_with_type( } /// 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 { /// The actor which is described here, for example `acct:LemmyDev@mastodon.social` pub subject: String, @@ -237,7 +237,7 @@ pub struct Webfinger { } /// A single link included as part of a [Webfinger] response. -#[derive(Serialize, Deserialize, Debug, Default)] +#[derive(Serialize, Deserialize, Debug, Default, PartialEq)] pub struct WebfingerLink { /// Relationship of the link, such as `self` or `http://webfinger.net/rel/profile-page` pub rel: Option,