diff --git a/src/commands/aur.rs b/src/commands/aur.rs index ff0a047..b3bac1b 100644 --- a/src/commands/aur.rs +++ b/src/commands/aur.rs @@ -42,7 +42,7 @@ struct Package { #[serde(rename = "Description")] description: String, #[serde(rename = "URL")] - url: String, + url: Option, #[serde(rename = "NumVotes")] votes: u16, #[serde(rename = "Popularity")] @@ -54,7 +54,11 @@ impl fmt::Display for Package { write!( f, "aur/{} {} (+{})\n {}\n url: {}", - self.name, self.version, self.votes, self.description, self.url + self.name, + self.version, + self.votes, + self.description, + self.url.clone().unwrap_or(String::from("none")) ) } }