From a57759ea8011954bbc98655d24cae67e679854b3 Mon Sep 17 00:00:00 2001 From: realaravinth Date: Sat, 30 Apr 2022 23:50:45 +0530 Subject: [PATCH] feat: add owner field and implement Hash for all Gitea response types --- src/gitea.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gitea.rs b/src/gitea.rs index ae645a9..2e3139e 100644 --- a/src/gitea.rs +++ b/src/gitea.rs @@ -25,7 +25,7 @@ pub struct SearchResults { pub data: Vec, } -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[derive(Debug, Clone, PartialEq, Hash, Eq, Serialize, Deserialize)] pub struct User { pub id: usize, pub login: String, @@ -65,6 +65,7 @@ pub struct Repository { pub ssh_url: String, pub clone_url: String, pub original_url: String, + pub owner: User, pub website: String, pub stars_count: usize, pub forks_count: usize, @@ -108,7 +109,7 @@ pub struct RepoTransfer { pub teams: Option, } -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[derive(Debug, Clone, PartialEq, Serialize, Hash, Deserialize)] pub struct Organization { pub avatar_url: String, pub description: String, @@ -121,7 +122,7 @@ pub struct Organization { pub website: String, } -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[derive(Debug, Clone, PartialEq, Serialize, Hash, Deserialize)] #[serde(rename_all = "lowercase")] pub enum Permission { None,