Skip to content

Commit

Permalink
refactor: utilize format!
Browse files Browse the repository at this point in the history
  • Loading branch information
null8626 committed Feb 2, 2024
1 parent c981d48 commit f9ed722
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
6 changes: 2 additions & 4 deletions src/commands/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,13 @@ pub async fn run(base_app: BaseApp, args: Args) -> Result<()> {
}
Ordering::Less => {
println!(
" {}\n {} {} => {}\n {} {}",
" {}\n {} {} => {}\n {} {}/releases/tag/{latest_ver}",
style("> A new version is available!").cyan(),
style("|").cyan(),
style(env!("CARGO_PKG_VERSION")).red(),
style(&latest_ver).green().bold(),
style("|").cyan(),
env!("CARGO_PKG_REPOSITORY").to_owned()
+ "/releases/tag/"
+ &latest_ver.to_string()
env!("CARGO_PKG_REPOSITORY"),
);
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/core/serverjar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,7 @@ impl<'a> BuildContext<'a> {
spinner.enable_steady_tick(Duration::from_millis(200));
spinner.set_prefix(format!("[{tag}]"));

let mut log_file =
File::create(self.output_dir.join(".".to_owned() + tag + ".mcman.log")).await?;
let mut log_file = File::create(self.output_dir.join(format!(".{tag}.mcman.log"))).await?;

log_file
.write_all(format!("=== mcman {tag} / {label} output ===\n\n").as_bytes())
Expand Down
2 changes: 1 addition & 1 deletion src/sources/maven.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ impl<'a> MavenAPI<'a> {
let file = if file.contains('.') {
file
} else {
file + ".jar"
format!("{file}.jar")
};

let download_url = format!(
Expand Down

0 comments on commit f9ed722

Please sign in to comment.