From 23c51ac1daa9197f985835ad0ed698aa6b1781f3 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sat, 24 Feb 2024 23:03:06 +0000 Subject: [PATCH] automatic cargo CI changes --- src/config/mod.rs | 2 +- src/git/mod.rs | 2 -- src/lib.rs | 2 +- src/serverapi/forgejo.rs | 4 +++- src/serverapi/gitea.rs | 4 +++- src/serverapi/github.rs | 4 +++- src/serverapi/gitlab.rs | 4 +++- src/serverapi/mod.rs | 7 ++----- 8 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/config/mod.rs b/src/config/mod.rs index b02f7c6..df3b0ac 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -108,7 +108,7 @@ pub struct Api { /// [endpoint](Api::endpoint) [Url]. pub auth: Option, /// Name of the repository on the Git server, as git itself has no concept of repository name - pub repository: String + pub repository: String, } impl YamlConfigSection for Api { fn check(&self) -> Result<()> { diff --git a/src/git/mod.rs b/src/git/mod.rs index b7cb3e2..89893df 100644 --- a/src/git/mod.rs +++ b/src/git/mod.rs @@ -1,5 +1,3 @@ -use git2; - use crate::{config::Config, error::Result}; pub async fn tag(_cfg: &Config) -> Result { diff --git a/src/lib.rs b/src/lib.rs index fe7db2f..2cae749 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,7 @@ pub mod changelog; pub mod config; pub mod error; +pub mod git; pub mod publish; pub mod release; pub mod serverapi; -pub mod git; diff --git a/src/serverapi/forgejo.rs b/src/serverapi/forgejo.rs index 576179c..4482e1a 100644 --- a/src/serverapi/forgejo.rs +++ b/src/serverapi/forgejo.rs @@ -80,5 +80,7 @@ impl ServerApi for Forgejo { async fn push_pkg(&mut self, _pc: PublishContext) -> Result<()> { todo!() } - fn get_cfg(&self) -> &Api {&self.cfg} + fn get_cfg(&self) -> &Api { + &self.cfg + } } diff --git a/src/serverapi/gitea.rs b/src/serverapi/gitea.rs index 7d6279d..3e6460a 100644 --- a/src/serverapi/gitea.rs +++ b/src/serverapi/gitea.rs @@ -23,7 +23,9 @@ impl ServerApi for Gitea { async fn push_pkg(&mut self, _pc: PublishContext) -> Result<()> { todo!() } - fn get_cfg(&self) -> &Api {&self.cfg} + fn get_cfg(&self) -> &Api { + &self.cfg + } } impl Gitea { diff --git a/src/serverapi/github.rs b/src/serverapi/github.rs index 30b43bd..468a983 100644 --- a/src/serverapi/github.rs +++ b/src/serverapi/github.rs @@ -23,7 +23,9 @@ impl ServerApi for Github { async fn push_pkg(&mut self, _pc: PublishContext) -> Result<()> { todo!() } - fn get_cfg(&self) -> &Api {&self.cfg} + fn get_cfg(&self) -> &Api { + &self.cfg + } } impl Github { diff --git a/src/serverapi/gitlab.rs b/src/serverapi/gitlab.rs index 644114b..2706b11 100644 --- a/src/serverapi/gitlab.rs +++ b/src/serverapi/gitlab.rs @@ -23,7 +23,9 @@ impl ServerApi for Gitlab { async fn push_pkg(&mut self, _pc: PublishContext) -> Result<()> { todo!() } - fn get_cfg(&self) -> &Api {&self.cfg} + fn get_cfg(&self) -> &Api { + &self.cfg + } } impl Gitlab { diff --git a/src/serverapi/mod.rs b/src/serverapi/mod.rs index 9354c51..b1894da 100644 --- a/src/serverapi/mod.rs +++ b/src/serverapi/mod.rs @@ -1,13 +1,10 @@ -use std::{ - ops::{Deref, DerefMut}, - slice::Iter, -}; +use std::ops::{Deref, DerefMut}; use async_trait::async_trait; use reqwest::ClientBuilder; use crate::{ - config::{ApiType, Config, self}, + config::{self, ApiType, Config}, error::*, publish::PublishContext, release::ReleaseContext,