From ee71406484016a1de882e1aa26a5ef824d01e672 Mon Sep 17 00:00:00 2001 From: TomGoodIdea Date: Sat, 12 Sep 2026 20:10:24 +0100 Subject: [PATCH 1/2] Make the long plugin description field optional --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index 60a274f..17244cd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -39,6 +39,7 @@ struct AvailablePlugin { version: String, #[serde(alias = "shortDescription")] short_description: String, + #[serde(default)] description: String, url: String, #[serde(alias = "iconUrl")] From 1ac2f7837f3a76c4aaae9d25e5615d3358a7afe8 Mon Sep 17 00:00:00 2001 From: TomGoodIdea Date: Sat, 12 Sep 2026 22:31:45 +0100 Subject: [PATCH 2/2] Use Option --- src/lib.rs | 3 +-- src/plugin.rs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 17244cd..83d2d9d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -39,8 +39,7 @@ struct AvailablePlugin { version: String, #[serde(alias = "shortDescription")] short_description: String, - #[serde(default)] - description: String, + description: Option, url: String, #[serde(alias = "iconUrl")] icon_url: Option, diff --git a/src/plugin.rs b/src/plugin.rs index c49948b..f9afb23 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -48,7 +48,7 @@ impl Plugin { /// Returns the plug-in's description, if it is available pub fn description(&self) -> Option { - Some(self.available.as_ref()?.description.clone()) + self.available.as_ref()?.description.clone() } /// Attempts to retrieve the plug-in's icon from a number of sources.