From d2e3da78352d2c6ffcfec212cff0ebb0d190ecf2 Mon Sep 17 00:00:00 2001 From: NGnius Date: Wed, 13 May 2020 20:41:23 -0400 Subject: [PATCH] Fix build errors --- src/apis/repository_api.rs | 11 ++++++++--- src/models/repository.rs | 12 ++++++------ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/apis/repository_api.rs b/src/apis/repository_api.rs index 7fa90fd..aeddc13 100644 --- a/src/apis/repository_api.rs +++ b/src/apis/repository_api.rs @@ -1,10 +1,10 @@ -/* +/* * Gitea API. * * This documentation describes the Gitea API. * * OpenAPI spec version: 1.1.1 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -6096,7 +6096,12 @@ implRepositoryApi for RepositoryApiClient { query.append_pair("state", &state.to_string()); query.append_pair("sort", &sort.to_string()); query.append_pair("milestone", &milestone.to_string()); - query.append_pair("labels", &labels.join(",").to_string()); + let mut label_str = "".to_owned(); + for label in labels { + label_str += &label.to_string(); + label_str += ","; + } + query.append_pair("labels", &label_str[..label_str.chars().count()-1].to_string()); for (key, val) in &auth_query { query.append_pair(key, val); } diff --git a/src/models/repository.rs b/src/models/repository.rs index 8be02ae..04b8831 100644 --- a/src/models/repository.rs +++ b/src/models/repository.rs @@ -1,10 +1,10 @@ -/* +/* * Gitea API. * * This documentation describes the Gitea API. * * OpenAPI spec version: 1.1.1 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -74,7 +74,7 @@ pub struct Repository { #[serde(rename = "owner")] owner: Option<::models::User>, #[serde(rename = "parent")] - parent: Option<::models::Repository>, + parent: Option>, #[serde(rename = "permissions")] permissions: Option<::models::Permission>, #[serde(rename = "private")] @@ -638,15 +638,15 @@ impl Repository { } pub fn set_parent(&mut self, parent: ::models::Repository) { - self.parent = Some(parent); + self.parent = Some(Box::new(parent)); } pub fn with_parent(mut self, parent: ::models::Repository) -> Repository { - self.parent = Some(parent); + self.parent = Some(Box::new(parent)); self } - pub fn parent(&self) -> Option<&::models::Repository> { + pub fn parent(&self) -> Option<&Box<::models::Repository>> { self.parent.as_ref() }