Make URL optional for AUR queries
This commit is contained in:
parent
9805472d26
commit
9d91609b70
|
@ -42,7 +42,7 @@ struct Package {
|
|||
#[serde(rename = "Description")]
|
||||
description: String,
|
||||
#[serde(rename = "URL")]
|
||||
url: String,
|
||||
url: Option<String>,
|
||||
#[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"))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user