remove fancypanic as its redundant now.

This commit is contained in:
endernon 2024-12-25 00:23:54 +00:00
parent 66fd2ce14e
commit e2868aed8c

View file

@ -52,8 +52,6 @@ fn dl_json(
} }
fn main() { fn main() {
// enable fancypanic when building for release
fancypanic();
let args = Args::parse(); let args = Args::parse();
let mut executablePath = env::current_exe().unwrap(); let mut executablePath = env::current_exe().unwrap();
PathBuf::pop(&mut executablePath); PathBuf::pop(&mut executablePath);
@ -275,19 +273,6 @@ fn cook(args: Args, executable_path: &str, mut debug_mode: bool) -> Result<(), E
Ok(()) Ok(())
} }
fn fancypanic() {
panic::set_hook(Box::new(|panic_info| {
let panic_msg = format!("{panic_info}");
println!(
"{}",
panic_msg
.lines()
.nth(1)
.unwrap_or("HOW DID YOU BREAK THE PANIC HANDLER???")
);
}));
}
fn pass() {} fn pass() {}
const ERROR: [&'static str; 7] = [ const ERROR: [&'static str; 7] = [