Refactor outdated mechanism

Resolves #104
This commit is contained in:
kpcyrd
2019-07-28 07:35:04 +02:00
parent fd9b1d6abb
commit 4fa2f68cf9
4 changed files with 57 additions and 22 deletions

View File

@@ -31,6 +31,12 @@ pub struct ModuleInfoResponse {
pub latest: Option<String>,
}
impl ModuleInfoResponse {
pub fn canonical(&self) -> String {
format!("{}/{}", self.author, self.name)
}
}
#[derive(Debug, Serialize, Deserialize)]
pub struct SearchResponse {
pub author: String,