From db14cb7a8fc60b8b2086d3dc68cc022d62c77a8a Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Fri, 16 Feb 2024 15:43:33 +0000 Subject: [PATCH] automatic cargo CI changes --- src/changelog/mod.rs | 8 ++++---- src/config/cli.rs | 2 +- src/main.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/changelog/mod.rs b/src/changelog/mod.rs index e7d5d8d..3e14b81 100644 --- a/src/changelog/mod.rs +++ b/src/changelog/mod.rs @@ -28,7 +28,7 @@ impl Changelog { let out = cmd.output()?; // FIXME: this does not catch fancy colors, those are from the shell as it seems? I don't // get it. - let buf = String::from_utf8(out.stdout).map_err(|err| ChangelogError::GitUTF8Error(err))?; + let buf = String::from_utf8(out.stdout).map_err(ChangelogError::GitUTF8Error)?; if !out.status.success() { // TODO: get the stderr for error reporting // TODO: Make the error more understandable for the user @@ -43,14 +43,14 @@ impl Changelog { let mut cmd = Command::new("git"); cmd.arg("describe").arg("--tags").arg("--abbrev=0"); let out = cmd.output()?; - let buf = String::from_utf8(out.stdout).map_err(|err| ChangelogError::GitUTF8Error(err))?; + let buf = String::from_utf8(out.stdout).map_err(ChangelogError::GitUTF8Error)?; if !out.status.success() { // TODO: get the stderr for error reporting // TODO: Make the error more understandable for the user return Err(ChangelogError::GitBadStatus(out.status, buf).into()); } - let buf = buf.replace("\n", ""); - return Ok(buf); + let buf = buf.replace('\n', ""); + Ok(buf) } } diff --git a/src/config/cli.rs b/src/config/cli.rs index 5751c65..8a81077 100644 --- a/src/config/cli.rs +++ b/src/config/cli.rs @@ -95,6 +95,6 @@ impl Cli { // less verbose version Logger::init_mini(Some(ll)).expect("could not initialize Logger"); } - return cli; + cli } } diff --git a/src/main.rs b/src/main.rs index 7e45f2b..0a625c9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,7 +13,7 @@ fn main() -> Result<()> { match cli.command { Commands::Changelog { .. } => { - println!("{}", Changelog::build(&cfg)?.to_string()); + println!("{}", Changelog::build(&cfg)?); Ok(()) } Commands::Release { .. } => {