Compare commits

...

2 Commits

Author SHA1 Message Date
Ian Wijma b7583f4db0 Update Cargo.toml for optimized release binary
Configured the `Cargo.toml` to automatically strip symbols, optimize for size, enable Link Time Optimization (LTO), and set codegen-units to 1 for the release profile. This significantly reduces the size and improves the performance of the resulting binary.
2023-11-21 00:08:17 +11:00
Ian Wijma 9392325115 Correct commit message for the given diff:
Add newline character to error message

In this commit, a newline character `\n` was added at the end of the error message in the `print!` function within main.rs. This change ensures the output from the program is properly formatted and readable, increasing the overall user experience when such exceptions are encountered.
2023-11-21 00:08:03 +11:00
2 changed files with 8 additions and 1 deletions

View File

@ -7,3 +7,10 @@ edition = "2021"
[dependencies]
clap = { version = "4.4.8", features = ["derive", "unicode", "wrap_help"] }
[profile.release]
strip = true # Automatically strip symbols from the binary.
opt-level = "z" # Optimize for size.
lto = true
codegen-units = 1

View File

@ -120,7 +120,7 @@ fn run_command(retry: &mut Retry) {
println!("Restarting...");
restart(retry);
} else {
print!("The process has crashed more then {} times in the past {}, stop restarting", retry.max_retries, retry.restart_name);
print!("The process has crashed more then {} times in the past {}, stop restarting\n", retry.max_retries, retry.restart_name);
}
}
}