use Display for errors rather than Debug

This commit is contained in:
Jacob Lifshay 2026-01-04 18:33:41 -08:00
parent b1d83b1d84
commit 45e8925d34
Signed by: programmerjake
SSH key fingerprint: SHA256:HnFTLGpSm4Q4Fj502oCFisjZSoakwEuTsJJMSke63RQ

View file

@ -2235,7 +2235,7 @@ impl Page {
}
}
fn main() -> Result<(), Box<dyn std::error::Error>> {
fn main_inner() -> Result<(), Box<dyn std::error::Error>> {
let args: Vec<String> = std::env::args().collect();
let page_numbers: Option<Box<dyn Iterator<Item = NonZero<u32>>>> = if 2 < args.len() {
Some(if let Some((start, end)) = args[2].split_once(":") {
@ -2277,3 +2277,13 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
std::fs::write("powerisa-instructions.xml", output)?;
Ok(())
}
fn main() -> std::process::ExitCode {
match main_inner() {
Ok(()) => std::process::ExitCode::SUCCESS,
Err(e) => {
println!("Error: {e}");
std::process::ExitCode::FAILURE
}
}
}