Autoformat

This commit is contained in:
2025-07-03 17:30:56 -05:00
parent c9dda5760c
commit 84eaaa1dbd
5 changed files with 22 additions and 36 deletions

View File

@@ -1,4 +1,3 @@
use std::path;
use gt_tool::cli::Args;
@@ -22,10 +21,7 @@ async fn main() -> Result<(), gt_tool::Error> {
headers.append("Authorization", token.parse().unwrap());
}
let client = reqwest::Client::builder()
.user_agent(format!(
"gt-tools-agent-{}",
env!("CARGO_PKG_VERSION")
))
.user_agent(format!("gt-tools-agent-{}", env!("CARGO_PKG_VERSION")))
.default_headers(headers)
.build()?;
@@ -37,14 +33,11 @@ async fn main() -> Result<(), gt_tool::Error> {
// user's command prompt. Otherwise the newest item scrolls off the
// screen and can't be seen.
itertools::Itertools::intersperse(
releases
.iter()
.rev()
.map(|release| release.colorized()),
String::from("")
)
.map(|release| println!("{}", release))
.fold((), |_, _| () );
releases.iter().rev().map(|release| release.colorized()),
String::from(""),
)
.map(|release| println!("{}", release))
.fold((), |_, _| ());
}
gt_tool::cli::Commands::CreateRelease {
name,
@@ -61,13 +54,8 @@ async fn main() -> Result<(), gt_tool::Error> {
tag_name,
target_commitish,
};
gt_tool::api::release::create_release(
&client,
&args.gitea_url,
&args.repo,
submission,
)
.await?;
gt_tool::api::release::create_release(&client, &args.gitea_url, &args.repo, submission)
.await?;
}
gt_tool::cli::Commands::UploadRelease {
tag_name,
@@ -97,8 +85,10 @@ async fn main() -> Result<(), gt_tool::Error> {
Ok(false) => return Err(gt_tool::Error::NoSuchFile),
Err(e) => {
eprintln!("Uh oh! The file-exists check couldn't be done: {e}");
panic!("TODO: Deal with scenario where the file's existence cannot be checked (e.g.: no permission)");
},
panic!(
"TODO: Deal with scenario where the file's existence cannot be checked (e.g.: no permission)"
);
}
}
}
for file in files {